For some inexplicable reason the Venue dropdown has stopped working.<br />
Looking at the error log I get repeated several times
[06-Sep-2016 08:49:17 UTC] PHP Fatal error: Call to a member function wp_rewrite_rules()
on a non-object in /var/www/html/wp-includes/rewrite.php on line 510
I have tried disabling all other non-essential plug-ins but it makes not difference.
WordPress Version 4.6
Event Organiser 3.1.3
Event Organiser Discount Codes 1.2.2
Event Organiser ICAL Sync 2.3.0
Event Organiser Pro 1.11.7
Event Organiser Stripe 2.1.2
Event Organiser Venue Markers 1.0.2
Richard Irwin
Richard,
If you comfortable doing so, could you add the following line:
error_log( wp_debug_backtrace_summary() );
to line 464 includes/rewrite.php
: https://github.com/WordPress/WordPress/blob/4.6/wp-#L464 and report back with the error message that comes back.
It would appear that the function url_to_postid()
is being called – perhaps too early – but Event Organiser (or Pro) doesn’t use that function.
Stephen Harris
Dear Stephen
Here is the output – it does not mean much to me!
[06-Sep-2016 16:17:04 UTC] PHP Fatal error: Call to a member function wp_rewrite_rules() on a non-object in /var/www/html/wp-includes/rewrite.php on line 510
[06-Sep-2016 16:17:04 UTC] require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘plugins_loaded’), call_user_func_array, __load_mailchimp_sync, include(‘/plugins/mailchimp-sync/bootstrap.php’), MC4WP\Sync\ListSynchronizer->__construct, MC4WP\Sync\ListSynchronizer->get_log, mc4wp, MC4WP_Container->get, call_user_func, mc4wp_get_debug_log, wp_upload_dir, apply_filters(‘upload_dir’), call_user_func_array, BP_Docs_Attachments->filter_upload_dir, BP_Docs_Attachments->get_doc_id, BP_Docs_Attachments::get_doc_id_from_url, url_to_postid
Richard Irwin
Hi Richard,
This looks like it’s a bug with the mailchimp-sync plug-in. It’s calling the url_to_postid()
function (which uses the global $wp_rewrite_rules
on the plugins_loaded
hook – but that variable is not defined until after plugins_loaded
.
It’s not sure why it doesn’t effect every page load, perhaps there’s some application logic which means that it isn’t called in other contexts, but try disabling that plug-in and seeing if that fixes the issue.
Stephen Harris
Thank you Stepehen, I have disabled the plug-in and we are again operational.
All the best
Richard
Richard Irwin