I am trying to:
Hello, I have found a common Toolset compatibility bug with PHP 8.0 so I had to downgrade the PHP version to 7.4. I have created a view a there is a search field that performs the AJAX search. It used to work fine previously I recently migrated my hosting to Linode and we had PHP 8.0 here so I downgraded it. However, it doesn't solve the problem. When ajax search is enabled, it breaks the code and throws a critical error.
Link to a page where the issue can be seen: hidden link
I expected to see:
A working search option with AJAX enabled however it is not working correctly so I had to disable the ajax for now in order to make the page work.
Instead, I got:
Screenshot attached.
Thank you for getting in touch. I managed to take a look at your site and noticed that once the AJAX is enabled the following notice is being displayed in the debug log.
[13-Jan-2022 19:30:14 UTC] PHP Deprecated: Required parameter $field follows optional parameter $post in /var/www/html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/api.php on line 405
[13-Jan-2022 19:30:14 UTC] The is_ajax function is deprecated since version 6.1.0. Replace with wp_doing_ajax.
It's quite possible that since you have 50 plus active plugins that there is some conflict between your plugins/theme.
In a case like this when the plugins are not functioning as intended we recommended that you disable the non-toolset plugins.
What this means is that you will need to go through your list of plugins and disable each of your plugins one at a time while checking to see if the issue still remains.
Hello Shane.
Thank you for getting back to me. Well, I was having the exact same number of plugins before as well on the previous server so I don't think this is the reason. This bug is reported commonly by many Toolset users on their forum as well e.g: https://toolset.com/forums/topic/php-8-fatal-error/
My scenario was exactly the same. My new server hosted on Linode CENT OS had PHP 8.0 installed so it replicated the same errors. However, when I downgraded the PHP version, fixed some part of it but not all.
The issue still exists when I switch to "Ajax search" or "Let me chose settings manually" option.
I took a copy of your site and ran it locally here. With no change the AJAX worked perfectly fine. I see from your debug data that php version 8 is enabled again.
I know that we have not yet announced php 8 compatibility as yet but we are working on compatibility. I would like if you downgraded back to at least version 7.4 of PHP so that I can continue to troubleshoot.