-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use dequeue rather than deregister to prevent Query Monitor Errors #793
Comments
Great, thanks @mrwweb! Will fix! |
@mrwweb I didn't dive deep enough in to check what each of those functions look like, but saw enough examples of developers calling both, so went with that for now. Please let me know if persists with latest code. Could you please let me know a bit more of your test environment? ie Theme/plugins in use? I wasn't able to get Query Monitor showing me that error on a vanilla WP test site... |
@leonstafford Sorry I didn't get back to you sooner. I poked around at this a bit and I'm not quite sure what you're running into. I've got a site running nothing but Query Monitor and wp2static with Twenty Twenty as the active theme and I'm still getting the error displayed in Query Monitor. I wish I had something better to tell you! |
@leonstafford Sorry for not being clearer! The fix definitely works, but I couldn't figure out why you couldn't reproduce the issue for yourself before that. |
@mrwweb ah, all good then! Probably just the environment I was using (https://lokl.dev). In case you try it and find WP Debug not working as usual, happy to fix it |
With WP2Static installed, Query Monitor shows an error on every page "Missing: wp-embed". This is because that script is deregistered but not dequeued.
Changing that linked line from
wp_deregister_script()
towp_dequeue_script()
resolved the error (and I believe is the correct way to do what is intended).Relevant support thread.
The text was updated successfully, but these errors were encountered: