You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Site is Experiencing a Technical Issue in lib/client-assets.php file #16360
Describe the bug
There seems to be a bug in the client-assets.php file.
To reproduce
Actually, I am not sure how to reproduce this as I only received an email by my WordPress installation informing me that:
Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
In this case, WordPress caught an error with one of your plugins, Gutenberg.
...
Error Details
An error of type E_ERROR was caused in line 58 of the file /.../httpdocs/wp-content/plugins/gutenberg/lib/client-assets.php. Error message: Uncaught Error: Call to a member function query() on null in /.../httpdocs/wp-content/plugins/gutenberg/lib/client-assets.php:58
Stack trace:
#0 /.../httpdocs/wp-content/plugins/gutenberg/lib/client-assets.php(539): gutenberg_override_script('react', 'https://www.dav...', Array, NULL) #1 /.../httpdocs/wp-content/plugins/gutenberg/lib/client-assets.php(435): gutenberg_register_vendor_script('react', 'https://unpkg.c...', Array) #2 /.../httpdocs/wp-content/plugins/gutenberg/lib/client-assets.php(230): gutenberg_register_vendor_scripts() #3 /.../httpdocs/wp-includes/class-wp-hook.php(286): gutenberg_register_scripts_and_styles('') #4 /.../httpdocs/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #5 /...
When looking at my homepage, I was not able to see any problems, but as I received this email for the sixth time within a few weeks (using different versions of Gutenberg), I wanted to report this issue.
Expected behavior
I would expect that no such error messages occur.
Desktop (please complete the following information):
We discussed this in editor triage and couldn't really figure out how to reproduce this. Haven't seen this before either.
For now closing this, but if you're able to reproduce this after disabling all the plugins (preferably a fresh install), let us know and some steps to reproduce as well.
Activity
swissspidy commentedon Jul 1, 2019
Here's the code in question:
gutenberg/lib/client-assets.php
Lines 55 to 58 in 08cda3f
Given that this code runs on
wp_enqueue_scripts/admin_enqueue_scripts,$wp_scriptsshould be available there.To me that sounds more like a bug caused by some other plugin that accidentally removes that global variable.
I guess the code could first check whether the object is there, but that would also mean papering over an actual issue on the site.
SeniorSpielbergo commentedon Jul 2, 2019
@swissspidy What would you recommend? Is there a way for me to support you / identify which plug-in might be causing this issue?
Also might this be related to #15829?
ehti commentedon Apr 2, 2020
Hi @SeniorSpielbergo,
We discussed this in editor triage and couldn't really figure out how to reproduce this. Haven't seen this before either.
For now closing this, but if you're able to reproduce this after disabling all the plugins (preferably a fresh install), let us know and some steps to reproduce as well.
Thank you!