fyaconiello
Forum Replies Created
-
Forum: Plugins
In reply to: [WP-Stateless - Google Cloud Storage] Guzzle undefined function@jkohlbach I’m currently on a project that is encountering the same issue – I inherited a whole stack of woocommerce / elementor / addons and am trying to get GCP bucket running using wp-stateless and hitting that guzzle error. Did you find a solution for this?
Forum: Plugins
In reply to: [WP GeoPosts] Does it slow the query?The only part of the plugin I might keep is this one file: https://github.com/fyaconiello/wp-geo-posts/blob/master/includes/geo-query.php
if you copy that into your theme or a new plugin and then modify it to remove this stuff and then make sure you only call geoposts when passing an appropriate post_type to the
$args
of the WP_GeoQuery class.Also, do you have an aswer for my previous question? About order of parameters in the query (keyword and category before location). Cause when I search for a post in paris, it returns the right post. When I search one of its categories, it returns also the same post. But when I search for the same category IN paris, it returns nothing.
The order of the params shouldn’t matter. WP_Query doesnt care about the order of params. WP_GeoQuery is at its base, just adding a few things into WP_Query.
Let me walk you through it:
my class extends WP_Query. It has all the same limitations and functionality as its parent WP_Query.
class WP_GeoQuery extends WP_Query
I set a bunch of filters that modify the raw sql that WP_Query runs. Basically, I join on the postmeta table a few times for longitude and latitude, and run a haversine formula on those lats and longs to determine distance from the passed in point.
add_filter('posts_fields', array($this, 'posts_fields'), 10, 2); add_filter('posts_join', array($this, 'posts_join'), 10, 2); add_filter('posts_where', array($this, 'posts_where'), 10, 2); add_filter('posts_orderby', array($this, 'posts_orderby'), 10, 2); add_filter('posts_distinct', array($this, 'posts_distinct'), 10, 2);
parent::query($args);
and then I remove all of my filters so that they do not affect other queries
you should be able to trace all of the logic that this is doing.
Forum: Plugins
In reply to: [WP GeoPosts] Does it slow the query?I wouldn’t use this plugin in production as-is. It hasn’t been used/tested in 2+ years. Feel free to cannibalize the plugin and take the working parts.
Example: The WPGeoQuery class will probably continue to work well in newer version of WordPress.
The plugin was abandoned b/c it doesn’t do well on shared hosts. The plugin relies on Google’s map geocoding api. The API has a hard limit of geocodes in a given period that is tied to an IP. So on shared hosting where many websites share an IP, the limit is reached instantly and the plugin can no longer geocode.
This was a little about the issue and a possible workaround that never got implemented: https://github.com/fyaconiello/wp-geo-posts/issues/4
Forum: Plugins
In reply to: [WP GeoPosts] Implementing Radiusyou should use the github, there are a couple small updates and bug fixes there.
https://github.com/fyaconiello/wp-geo-posts
in the bottom of the readme there is an example w/ a radius.
A couple known unsolved issues:
If you use shared hosting this probably won’t work well. Geoencoding addresses uses Google’s geoencoding service which limits how many geocodes can be done per day PER IP. So if other people are geoencoding on your shared environment there may not be enough encodes for you.
If you have a huge number of geoposts, you will run into another issue. calculating distance on EVERY post before limiting on radius is going to take forever. You can modify my plugin using this: https://www.plumislandmedia.net/mysql/haversine-mysql-nearest-loc/ look at the optimization header to pre-filter before records you are calculating distance on.
Forum: Fixing WordPress
In reply to: WordPress Admin PHP FastCGI 502 Bad Gateway ErrorsSo foot in mouth. It ended up being an application code issue for me. Something happened in my WordPress working directory (a vulnerability / hack / ftp user that should have access revoked). I ended up overwriting the wp-includes and wp-admin directories/content with latest (wget https://www.ads-software.com/latest.tar.gz).
Steps to debug: I downloaded the site from MT as a backup and to prepare for a move assuming that it would work in whatever non-mt environment I installed it. It didn’t run locally. So after some troubleshooting, I tried re-installing WordPress, and got it to work.
Whatever is happening in mod_security is making finding the root cause harder by putting some BS in the logs, but it is not actually the cause in my case.
Forum: Fixing WordPress
In reply to: WordPress Admin PHP FastCGI 502 Bad Gateway Errorsmy response to them:
This issue was addressed on the phone call, but never resolved. I have an ongoing issue with whatever you guys have set up in your mod_security configuration.
Media Temple needs to stop using the config that is causing this issue: “/etc/apache2/mod_security/custom/wpbrute.conf”
Myself and other WordPress site owners are having this issue. https://www.ads-software.com/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors?replies=14#p ost-6323305
We are going on 3 days of downtime. If I am unable to get proper resolution today, I will be forced to start taking steps to move my sites off of Media Temple.
Awaiting (mt) agent response…
Forum: Fixing WordPress
In reply to: WordPress Admin PHP FastCGI 502 Bad Gateway Errors@james MT = Media Temple, and this is the same issue everyone above is having with the wpbrute.conf sorry if I wasn’t clear with my description of the issue.
As an update, I just spent an hour on the phone with several different support techs at Media Temple. They had me change the file permissions several times after concluding that it was a permissions issue. However, their diagnosis of the problem and supposed solution has gotten me no closer to a fix. We just turned on error reporting and logging, so they want me to call back in a few hours after the logs have filled a bit.
Forum: Fixing WordPress
In reply to: WordPress Admin PHP FastCGI 502 Bad Gateway Errorsi’m also having this issue on MT:
[Thu Dec 11 06:25:12 2014] [error] [client 173.167.83.17] ModSecurity: Warning. Match of “rx ^POST$” against “REQUEST_METHOD” required. [file “/etc/apache2/mod_security/custom/wpbrute.conf”] [line 0;”9″] [hostname “www.xxxxxxxxxxx.com”] [uri “/wp-login .php”] [unique_id “VImpSEgv9A8AAAlbwQYAAAEE”]
on support now trying to get resolution
Forum: Plugins
In reply to: [Contact Form 7] How can I change the email recipientI am currently having this issue as well
[06-Aug-2014 12:59:38 UTC] PHP Warning: Parameter 1 to Candidate::contact_forms_post_submit() expected to be a reference, value given in /mnt/target04/XXXXX/XXXXXX/XXXXXX/web/content/wp-includes/plugin.php on line 470
I need to make API calls and send the values submitted through wpcf7_before_send_mail. How can I do this?
Forum: Plugins
In reply to: [Contact Form 7] before send mail function not getting calledI’m running
- Contact Form 7: Version 3.9
- Contact Form 7 – Dynamic Text Extension: Version 1.1.0.2
- Contact Form 7 widget: Version 1.0
- Contact Form DB: Version 2.8.5
- WordPress: 3.9.1
Forum: Plugins
In reply to: [Contact Form 7] before send mail function not getting calledbefore the plugin updated (I’m not sure what version I was running previous, but it couldn’t have been more than 2 months old) This hook was calling correctly:
add_action( ‘wpcf7_before_send_mail’, array(&$this, “contact_forms_post_submit”), 10, 2 );
class Candidate
{
function contact_forms_post_submit( &$contactform )
{
….
}
}and then inside that function I could use things like: $contactform->posted_data[“text-79”];
now if I pass by reference I get the above php warning, and if I don’t, my $contact_form doesn’t have a posted_data member and I cannot add dynamic recipients to the form
Forum: Fixing WordPress
In reply to: Bullhorn IntegrationI’ve got an update on the WordPress Plugin I started:
Forum: Plugins
In reply to: [WP GeoPosts] Radius?Sorry for leaving you guys hanging on this. Apparently I dont get emails from the plugin site when people start discussions.
Someone just sent me an email today about adding the Radius options, and when he could expect them. This is what I wrote back:
The reason development on this one has been slow:
When I have an idea for a plugin/app/whatever, I generally do a minimum viable product so that I can use it for whatever project spurned the idea. All of the coming soon features are my thoughts for the future of the plugin. I generally get around to adding those features either when I am working on another project that requires them, or when someone from the community wants those features. Its a way of making sure that the features I plan are actually useful to more than just one project, and not just development for the hell of it.All that I ask, is that if you want me to develop out that extra feature + plan on using my plugin you donate a bit to the plugin fund. https://fyaconiello.github.com/wp-geo-posts/ (there is a paypal donate button.) I don’t care how much you donate, or even IF you donate – that isn’t a requirement for using the plugin – but donations do help motivate me to do non-client work.
It looks like there is probably enough interest for me to get developing. I’ll send out more updates as I go. GIT: https://github.com/fyaconiello/wp-geo-posts
Forum: Fixing WordPress
In reply to: Bullhorn IntegrationIf you are on a tight schedule, calling the team @co+LAB for questions about getting into that code cost/licensing/support/tips/pointers. The free version im working on the side is on a mini hiatus until i complete a few paid projects I’m working on.
Forum: Fixing WordPress
In reply to: Bullhorn IntegrationI’m in a crunch for work currently (my real job) so development on this has been a little slow. I have more code done, but it hasn’t been pushed to github just yet. What’s your timetable for needing this?
I work for https://www.teamcolab.com, the site I previously wrote a BH plugin for was https://www.mortonconsulting.com. I can’t directly post that code b/c colab owns it. Feel free to call/email us and discuss licensing or buying it from us. Or, if you have time to wait for my schedule to clear up, I’m working on the free one on the weekends.