I’ve encountered a fatal PHP error originating from Toolset Blocks when running an import via WP All Import. The issue prevents post creation and appears to come from the ViewParsingService class. Here’s the specific error from my debug.log:
PHP Fatal error: Uncaught TypeError: array_diff(): Argument #1 ($array) must be of type array, int given in /wp-content/plugins/toolset-blocks/backend/Services/ViewParsingService.php on line 178
The error occurs during an import that updates or creates posts. When Toolset Blocks is deactivated, the import works as expected.
Could you please look into this? It seems array_diff() in scan_for_view_block_usage() is being passed a value that’s not an array. A conditional check or stricter type handling might solve the issue.
Hello. Thank you for contacting the Toolset support.
I see you are using number of third-party plugins.
Just to ensure there is no other plugin is invoved in this conflict, what is you try to run the import with only Toolset plugins active. Do you see any difference? If no:
Can you please share exact steps and what file you are using in order to import the posts and send me all those required details with admin access to your stating site.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.