Skip Navigation

[Resolved] Toolset Blocks conflicts with another plugin

This support ticket is created 2 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 8 replies, has 2 voices.

Last updated by stevenT-5 2 years, 7 months ago.

Assisted by: Nigel.

Author
Posts
#2364125

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 the link to Lazy Block for your reference:
https://wordpress.org/plugins/lazy-blocks/

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.

Please advise and thank you.
Steven

#2364283

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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?

#2364367

Hello Nigel ~

You can access my dev site to see the errors:

[edit]

Please keep in mind that this is a multisite installation.

#2364415

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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.

#2364659

Hello Nigel ~

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.

Thanks

#2365057

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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).

#2365355

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.

#2366789

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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.

Or you can download the latest versions from your accounts page: https://toolset.com/account/downloads

If you still see any problems, let me know.

#2367617

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.