[Resolved] Toolset is causing a critical error on my website
This thread is resolved. Here is a description of the problem and solution.
Problem:
The issue here is that the user is experiencing a fatal error on their site when Views is being used. Checking their debug information we found that the user was running php version 8 on their server.
Solution:
Unfortunately we have not yet announced compatibility with php version 8 so it would be best to downgrade to a version of php 7 to resolve the issue.
This support ticket is created 3 years, 1 month 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.
Link to a page where the issue can be seen: Editing a page in the backed. You can see the error for a second before the page loads. I also get an email from WordPress with the following:
Error Details
=============
An error of type E_ERROR was caused in line 325 of the file /home/zj01jya8nsl9/public_html/luduspark.gabrielbajada-host2.com/wp-content/plugins/types/vendor/toolset/toolset-common/toolset-forms/classes/class.conditional.php. Error message: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /home/zj01jya8nsl9/public_html/luduspark.gabrielbajada-host2.com/wp-content/plugins/types/vendor/toolset/toolset-common/toolset-forms/classes/class.conditional.php:325
Stack trace:
#0 /home/zj01jya8nsl9/public_html/luduspark.gabrielbajada-host2.com/wp-content/plugins/types/vendor/toolset/toolset-common/toolset-forms/classes/class.conditional.php(325): array_map()
#1 /home/zj01jya8nsl9/public_html/luduspark.gabrielbajada-host2.com/wp-content/plugins/types/vendor/toolset/toolset-common/toolset-forms/classes/class.conditional.php(288): WPToolset_Forms_Conditional->array_unique_md()
#2 /home/zj01jya8nsl9/public_html/luduspark.gabrielbajada-host2.com/wp-content/plugins/types/vendor/toolset/toolset-common/toolset-forms/classes/class.conditional.php(335): WPToolset_Forms_Conditional->_parseData()
#3 /home/zj01jya8nsl9/public_html/luduspark.gabrielbajada-host2.com/wp-includes/class-wp-hook.php(303): WPToolset_Forms_Conditional->renderJsonData()
#4 /home/zj01jya8nsl9/public_html/luduspark.gabrielbajada-host2.com/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
#5 /home/zj01jya8nsl9/public_html/luduspark.gabrielbajada-host2.com/wp-includes/plugin.php(470): WP_Hook->do_action()
#6 /home/zj01jya8nsl9/public_html/luduspark.gabrielbajada-host2.com/wp-admin/admin-footer.php(95): do_action()
#7 /home/zj01jya8nsl9/public_html/luduspark.gabrielbajada-host2.com/wp-admin/post.php(369): require_once('/home/zj01jya8n...')
#8 {main}
thrown
I see that you're currently running php version 8. This is why the error is occurring, we have yet to announce compatibility for php version 8 so I would recommend downgrading back to a version of php 7 where compatibility can be guaranteed.