Incompatibility with “Content Control” plugin causes critical error
-
Hi,
there is an incompatibility betweeen “Search Exclude” plugin and “Content Control” plugin ( https://it.ww.wp.xz.cn/plugins/content-control/ ) that causes a critical error on the front-end if both plugins are active.The issue goes away deactivating one of the two plugins or downgrading Search Exclude to version 2.1.7
Both plugins and WordPress are up to date.
I tested “Search Exclude” plugin up to 2.4.5.
Any help?
-
To help us investigate the issue further, could you please send us the zip file of the conflicting plugin via http://www.wetransfer.com? This will allow us to analyze the conflict in more detail.
Please note that we cannot guarantee full compatibility with third-party plugins, but we will certainly investigate from our side to see if there’s anything we can do to resolve the issue.
Best regards.Latest version of “Content Control” plugin is available for download from wordpress repository, like any other free plugin:
https://downloads.wp.xz.cn/plugin/content-control.2.5.0.zipSame experience…the error was an overloaded stack. The latest version of Content Control 2.6.1 doesn’t solve the issue, but disabling Search Exclude does solve it.
Here is the error after updating Content Control:
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 262144 bytes) in /home2/xxx/public_html/wp-content/plugins/search-exclude/lib/services/class-entity-options.php on line 42
We haven’t been able to track what is hogging the memory so far as I can tell, the changes in 2.5.0 were related to caching restriction checks against each post, and storing the list of post_ids we needed to reset if we had to overload the global $post.
So it should have only had 1 at a time unless there was some deeply nested checks, but given we disable checks entirely on block editor template types, I can’t imagine anything where there would be posts rendered within posts nested so deeply that it fills up gigabyte of memory.
Best bet honestly, clone site to staging, comment out each of our Frontend Restriction methods one by one until the issue resolves, then uncomment the others.
My guess classes/Controllers/Frontend/Restrictions/QueryPosts.php, filtering post arrays.
If that is the case we’d need to further then dig into exactly where in that entire section of code and everything it calls it breaks by further commenting out code or returning early checking for where the issue goes away again.
The error messages are simply too generic to be helpful and the replication of this reliably in a test environment up until now not great.
Happy to help, testing this on our end as well.
EDIT: Can confirm this was easy to replicate with this particular plugin, digging into it now.-
This reply was modified 1 year, 2 months ago by
Daniel Iser.
@danieliser
Thank you for your commitment.Please note that the issue occurs from Search Exclude version 2.1.8 and goes away downgrading to version 2.1.7, therefore it must be caused by changes made in 2.1.8.
Perhaps a diff between versions 2.1.7 and 2.1.8 might help:
https://downloads.wp.xz.cn/plugin/search-exclude.2.1.7.zip
https://downloads.wp.xz.cn/plugin/search-exclude.2.1.8.zip@aledef Due to the way the recursion happens, my guess is they started either filtering all post types, or added a query to terms inside their filters that didn’t exist before.
Possible introductions of conflict:
- Filtering pre_get_posts: https://github.com/franmastromarino/wp-search-exclude/compare/v2.1.7…v2.1.8#diff-c9aa604d2b9379c7c892d6f6d8330c48c8ae80326f57b9bc3af92d8a3437549aR19
- Not returning the
$querywhen returning early: https://github.com/franmastromarino/wp-search-exclude/compare/v2.1.7…v2.1.8#diff-c9aa604d2b9379c7c892d6f6d8330c48c8ae80326f57b9bc3af92d8a3437549aR28 - Introduction of
get_termswithin an existing query filter: https://github.com/franmastromarino/wp-search-exclude/compare/v2.1.7…v2.1.8#diff-c9aa604d2b9379c7c892d6f6d8330c48c8ae80326f57b9bc3af92d8a3437549aR69-R84
Thanks again, looking forward to good news about the bug fix!
Hello guys,
We have installed the latest version of the Content Control plugin (2.6.1) and the latest version of Search Exclude (2.4.6) on our local server, and we haven’t experienced any errors. Please take a look at our screenshot: https://snipboard.io/eqW8Cw.jpg
Could you kindly let us know the version of PHP and WordPress you are using on your server so we can investigate the issue further?
Best regards.
@jmatiasmastro
I just set up a fresh WP install for testing purposes and the error is still there.
Here is my setup:
PHP 8.1.32
WordPress 6.7.2
Search Exclude 2.4.7
Content Control 2.6.1
Twenty Twenty-Five theme
No other plugin active
Here is how to reproduce the error:
Create a page and exclude it from Search Results using Search Exclude
Goto Content Control settings and create a new restriction
Set that same page to be a restricted content visible only to logged users
Log out from Wp (or open a different browser where you are not logged into WP)
Goto website homepege: you will get an Internal Server Error
If you are still unable to reproduce the error I can give you access to the fresh install I just setup where the error occurs. In that case please leave me an email to write to.@aledef Hi mate,
Thank you for providing the details. Unfortunately, we cannot accept login credentials for access. However, we are trying to replicate the issue on our end.
We’ve tested with our version 2.4.6, and the issue appears to be resolved in our localhost environment. To help us investigate further, could you please send us a screencast showing the exact steps you’re taking to reproduce the error?
It would be helpful if you could use http://www.loom.com for the screencast. Additionally, please ensure that only Search Exclude, Content Control, WooCommerce, and the Twenty Twenty-Five theme are active in your environment while reproducing the error.
Best regards,
QuadLayers Support Team.@jmatiasmastro,
Hi, I don’t have time for a screencast.
If you can’t reproduce the error and you can’t accept login credentials for access my testing website (wich by the way is just a temporary setup I created just to test issues like this) well then I guess we are stuck.
Have a nice day@aledef Hi mate, In that case, please send us an email at [email protected] so we can continue assisting you through our support system.
Best regards.Hi,
I updated all plugins on my test website and now the issue is gone but I still get the error on my production site, where many other plugins are active.
It looks like the error is triggered by conditions that are difficult to determine.
I’ll do some more tests and let you know if I can reproduce the error again. -
This reply was modified 1 year, 2 months ago by
The topic ‘Incompatibility with “Content Control” plugin causes critical error’ is closed to new replies.