Hi, I'm getting system error messages when having WP debug function turned on. This is what I get in the admin screen as well as front end screen:
Notice: is_archive was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /var/www/vhosts/____.com/httpdocs/wp-includes/functions.php on line 5775
Notice: is_home was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /var/www/vhosts/____.com/httpdocs/wp-includes/functions.php on line 5775
Notice: is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /var/www/vhosts/____.com/httpdocs/wp-includes/functions.php on line 5775
-
After going through the trouble of elimination process, I find out that Toolset Blocks does not like another plugin, Lazy Blocks. I have to turn off either one of these two plugins in order for the system not to throw the above error messages. So the two plugins can not co-exist. In my experience, Toolset Blocks had also caused other conflict issues in another project I worked on.
This is a critical issue for a web site that needs to go live soon. Both involved plugins play important functions for the site, so I can't simply eliminate one or the other. I need both.
Do you have some more details about what is required to produce the PHP warnings?
I add the Lazy Blocks plugin to my Toolset test site, I tried editing pages with the block editor, visiting block-based pages on the front end, visiting the settings pages of Lazy Blocks and Toolset, and nothing triggered the warnings in the debug log.
Do you have some more specific steps about how to reproduce the problem?
I've redacted those credentials, please bear in mind this is a public forum, and you should only share sensitive information when we set up a private reply for you.
I visited the back end of your site and see the PHP warnings, but I need to be able to do some debugging to try and identify what triggers them, when, and for that I'll need to install a copy of the site locally. (I can't reproduce the warnings on my own local site.)
I need super-admin rights to be able to install a pro backup plugin to be able to extract a copy of this sub-site. Would it be possible for you to change the role of the support user you added and shared credentials for? I would be adding Duplicator Pro and copying just this single site.
I set the login profile to be super admin. Thanks for reminding. I took a chance of to post sensitive info mainly because I didn't want to wait for another round of message exchange telling you I was about to post such info as I planned to be offline for the next few hours. I used All-in-one Migration plugin and don't have Duplicator Pro. So now you can login to export the site.
I took a copy of the site using All in One WP Migration and the issue persisted when installed locally.
You actually need Forminator active to reproduce the problem. Without getting into the fine details, Forminator prompts the pre_get_posts hook to run much earlier in the page cycle than normal, and the $post object isn't yet available, when it typically would be.
This has come up with a couple of other plugins recently, and we already have a fix pending. We are just waiting on the green light from the systems team to publish the updates, it should be any day now and could be as early as tomorrow.
When you update to Blocks 1.6.3 the problem will be resolved.
Keep an eye out for blog announcement about the release in case the update notice doesn't appear in your dashboard (plugins are normally released in batches, but you can skip the wait using the Check for Updates page of the registered plugin page).
Thanks for your investigation, Nigel. And that's good you found out about Forminator plugin. Interestingly, when Lazy Blocks comes into the mix, you get and errors. Do you think Forminator can improve its code (prompting the pre_get_posts hook to run much earlier) to avoid the issue? I hope to get a Toolset Blocks update release soon.
I don't think Forminator are doing anything "illegal" that they would be required to fix, it's just a question of conventions.
Anyway, we published the plugin updates today that include the fix for this issue.
If the updates do not show up on your plugin installer page (click the registered link beneath the plugin name to go to the custom installer page) click the the Check for Updates button to update the list.
Thanks for the update, Nigel.
I updated the plugin to latest version you mentioned, and the error messages are gone. So it looks like we got the problem solved for now. Thank you for your help.