Hi @benlinders,
This error seems really really weird since add_filter is available with every WordPress request.
Are there any other errors in your log? And which page does this seem to happen?
Best Regards,
This error is happening several times each hour, so I’m guessing it’s every time when someone visited one of the pages with an event on my website. But that’s a guess. You know the code of your plugin better than I do, so you might know when this stack pattern can occur?
I noticed there’s a pattern as the above error is usually followed by a second PHP fatal error:
[07-Oct-2020 18:04:20 UTC] PHP Fatal error: Uncaught Error: Call to a member function apply_filters() on array in /home/public/sites/www.benlinders.com/wp-includes/plugin.php:206
Stack trace:
#0 /home/public/sites/www.benlinders.com/wp-includes/l10n.php(41): apply_filters(‘locale’, ‘en_US’)
#1 /home/public/sites/www.benlinders.com/wp-includes/l10n.php(137): get_locale()
#2 /home/public/sites/www.benlinders.com/wp-includes/l10n.php(828): determine_locale()
#3 /home/public/sites/www.benlinders.com/wp-includes/class-wp-fatal-error-handler.php(46): load_default_textdomain()
#4 [internal function]: WP_Fatal_Error_Handler->handle()
#5 {main}
thrown in /home/public/sites/www.benlinders.com/wp-includes/plugin.php on line 206
Does this help?
Jaime
(@jaimemarchwinski)
Hi @benlinders
Thanks for providing us with that information.
Can you try a quick test and see if the functionality works as expected with a bare WordPress install? A bare install is basically a default WordPress theme like Twenty Twenty and no other plugins besides ours installed. You may want to consider trying this out on a staging site so that you don’t have to switch things around on your live site.
Can you also provide us with your system information?
https://theeventscalendar.com/knowledgebase/k/sharing-your-system-information/
I hope that helps!
Thanks,
Jaime
Thans for following up.
I’ve enabled sharing system information with you.
I don’t have a staging website/plugin so I can’t do a bare install.
The error is still occuring, here’s how it showed up this morning:
[16-Oct-2020 08:26:31 UTC] PHP Fatal error: Uncaught Error: Call to a member function add_filter() on array in /home/public/sites/www.benlinders.com/wp-includes/plugin.php:113
Stack trace:
#0 /home/public/sites/www.benlinders.com/wp-content/plugins/the-events-calendar/src/Tribe/I18n.php(184): add_filter(‘locale’, Object(Closure))
#1 /home/public/sites/www.benlinders.com/wp-content/plugins/the-events-calendar/src/Tribe/I18n.php(138): Tribe\Events\I18n->with_locale(‘en_US’, Array, Array)
#2 /home/public/sites/www.benlinders.com/wp-content/plugins/the-events-calendar/src/Tribe/Rewrite.php(743): Tribe\Events\I18n->get_i18n_strings_for_domains(Array, Array, Array, 2)
#3 /home/public/sites/www.benlinders.com/wp-content/plugins/the-events-calendar/src/Tribe/Rewrite.php(303): Tribe__Events__Rewrite->get_localized_bases(Array, Array)
#4 /home/public/sites/www.benlinders.com/wp-content/plugins/the-events-calendar/common/src/Tribe/Rewrite.php(127): Tribe__Events__Rewrite->get_bases(‘regex’)
#5 /home/public/sites/www.benlinders.com/wp-content/plugins/the-events-ca in /home/public/sites/www.benlinders.com/wp-includes/plugin.php on line 113
[16-Oct-2020 08:26:31 UTC] PHP Fatal error: Uncaught Error: Call to a member function apply_filters() on array in /home/public/sites/www.benlinders.com/wp-includes/plugin.php:206
Stack trace:
#0 /home/public/sites/www.benlinders.com/wp-includes/l10n.php(41): apply_filters(‘locale’, ‘en_US’)
#1 /home/public/sites/www.benlinders.com/wp-includes/l10n.php(137): get_locale()
#2 /home/public/sites/www.benlinders.com/wp-includes/l10n.php(828): determine_locale()
#3 /home/public/sites/www.benlinders.com/wp-includes/class-wp-fatal-error-handler.php(46): load_default_textdomain()
#4 [internal function]: WP_Fatal_Error_Handler->handle()
#5 {main}
thrown in /home/public/sites/www.benlinders.com/wp-includes/plugin.php on line 206
Jaime
(@jaimemarchwinski)
Hi @benlinders
Thanks for your reply. Another option would be to use the third-party Health Check plugin to mimic a bare install in Troubleshooting Mode:
https://ww.wp.xz.cn/plugins/health-check/
I’m not able to access your system information there. Can you copy and paste it here?
Thanks,
Jaime
Hi Jaime,
When using the health check plugin, my website remains the same for outside usesrs. Their usage will probably trigger the error so it will still appear in the log, afaik there’s no separate log for the trouble shooting site and even then it would be hard to prove absence of an error if I don’t know what usage provoces it?
Any idea what can cause the error? Anything I should try out or see? When is the code that raises the error execusted, what functionality does it provide?
Happy to email you the system information, but I’d rather not post it publically.
Ben Linders
Jaime
(@jaimemarchwinski)
Hi @benlinders ,
Thanks for your response. I’m sorry to hear that you are still experiencing this issue.
Unfortunately I’m not able to replicate this on my test site, so I am wondering if there’s something going on with your setup that is triggering this fatal error.
As a next step, can you email the system information to [email protected], reference this thread, and ask for me?
Thanks,
Jaime
Hi Jamie,
Thanks for following up. I’ve just send an email with the information. Hope that helps.
Ben Linders
Jaime
(@jaimemarchwinski)
Great, @benlinders, I’ll look out for that email!
Jaime
(@jaimemarchwinski)
Hey there! This thread has been inactive for a while so we’re going to go ahead and mark it Resolved. Please feel free to open a new thread if any other questions come up and we’d be happy to help. 🙂
The error isn’t solved, just send you an email with up to date information.
Hi @benlinders
I found your email in our system. We’ll continue the conversation there.
Cheers,
Andras
Thanks Andras, appreciate that!