davidsonh
Forum Replies Created
-
Forum: Plugins
In reply to: [The Events Calendar] WordPress database error@deblynprado and anyone who reads this. I believe we found the conflict. It seems that a function to allow search functionality for ACF fields from the dashboard search feature was conflicting with The Events Calendar plugin. We found the code here and here’s the function in question:
/** * Extend WordPress search to include custom fields * http://adambalee.com * * Join posts and postmeta tables * http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_join */ function cf_search_join( $join ) { global $wpdb; if ( is_search() ) { $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id '; } return $join; } add_filter('posts_join', 'cf_search_join' ); /** * Modify the search query with posts_where * http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_where */ function cf_search_where( $where ) { global $pagenow, $wpdb; if ( is_search() ) { $where = preg_replace( "/\(\s*".$wpdb->posts.".post_title\s+LIKE\s*(\'[^\']+\')\s*\)/", "(".$wpdb->posts.".post_title LIKE $1) OR (".$wpdb->postmeta.".meta_value LIKE $1)", $where ); } return $where; } add_filter( 'posts_where', 'cf_search_where' ); /** * Prevent duplicates * http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_distinct */ function cf_search_distinct( $where ) { global $wpdb; if ( is_search() ) { return "DISTINCT"; } return $where; } add_filter( 'posts_distinct', 'cf_search_distinct' );Hopefully this can help lead to a small patch to allow for compatibility with this function. Since we disabled this function, there have been no further occurrences of the error from my original post.
Forum: Plugins
In reply to: [The Events Calendar] WordPress database error@deblynprado any feedback?
Forum: Plugins
In reply to: [The Events Calendar] WordPress database errorUPDATE: Just had the first occurrence of the database error without the widget being active. We currently have a Text widget active, and our Events widget is in the inactive list.
Forum: Plugins
In reply to: [The Events Calendar] WordPress database errorCORRECTION: I had NOT removed the widget from the header widget area. Upon doing so, the WordPress server error message stopped throwing new log entries.
I’m working on the Testing for Conflicts procedure in a debug environment with the widget enabled.
Forum: Plugins
In reply to: [The Events Calendar] WordPress database errorThanks for the reply Deblyn!
I was out of the office between November 25 to December 6. I had been routinely checking the PHP error logs prior to my time off to troubleshoot a different plugin. I did not see the WordPress database error codes I posted prior to my time off. I first noticed them yesterday (December 7) when I checked to verify the other plugin was fixed. The widget is currently disabled, but we’re still seeing the WordPress database error I originally posted.
I’ll post again once I run through your Testing for Conflicts procedure.