We have recently migrated this site to Kinsta, with PHP8.1
We are now seeing large numbers of instances of this error in the logs:
2023/12/09 17:53:49 [error] 31887#31887: *183716 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: array_intersect(): Argument #1 ($array) must be of type array, string given in /www/profilebookscom_961/public/wp-content/plugins/toolset-blocks/application/controllers/cache/views/invalidator.php:274
Stack trace:
#0 /www/profilebookscom_961/public/wp-content/plugins/toolset-blocks/application/controllers/cache/views/invalidator.php(274): array_intersect('', Array)
#1 /www/profilebookscom_961/public/wp-content/plugins/toolset-blocks/application/controllers/cache/views/invalidator.php(217): OTGS\Toolset\Views\Controller\Cache\Views\Invalidator->invalidate_cache_per_domain('posts', Array)
#2 /www/profilebookscom_961/public/wp-includes/class-wp-hook.php(326): OTGS\Toolset\Views\Controller\Cache\Views\Invalidator->should_invalidate_cache('')
#3 /www/profilebookscom_961/public/wp-includes/class-wp-hook.php(350): WP_Hook->apply_filters(NULL, Array)
#4 /www/profilebookscom_961/public/wp-includes/plugin.php(531): WP_Hook->do_action(Array)
#5 /www/profileb" while reading upstream, client: 136.243.228.182, server: profilebooks.com, request: "GET /work/do-parents-matter/ HTTP/2.0", upstream: "hidden link:", host: "profilebooks.com:57528"
This is affecting the work detail template, which is a Content Template e.g.
hidden link
hidden link
I've looked over the CT and the Views it contains but can't see anything problematic. Checking if this is a known issue or if you can give any indication of how we can debug it when it doesn't reference our code directly.
Hi there,
The error you shared indicates one of the caches for the views is stuck in "Invalid" state.
Please go to "WordPress Dashboard > Toolset > Views", and click the "Clear Cache" button next to each view and see if it fixes the issue.
Thanks.
It seems to have done, thanks. I do note that the same file is now returning a lot of PHP warnings:
2023/12/11 08:30:08 [error] 72906#72906: *306789 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined variable $affectedSlugs in /www/profilebookscom_961/public/wp-content/plugins/toolset-blocks/application/controllers/cache/views/invalidator.php on line 276PHP message: PHP Warning: Undefined property: OTGS\Toolset\Views\Controller\Cache\Views\Invalidator::$modifiedObjects in /www/profilebookscom_961/public/wp-content/plugins/toolset-blocks/application/controllers/cache/views/invalidator.php on line 277PHP message: PHP Warning: Trying to access array offset on value of type null in /www/profilebookscom_961/public/wp-content/plugins/toolset-blocks/application/controllers/cache/views/invalidator.php on line 277PHP message: PHP Fatal error: Uncaught TypeError: array_intersect_key(): Argument #1 ($array) must be of type array, null given in /www/profilebookscom_961/public/wp-content/plugins/toolset-blocks/application/controllers/cache/views/invalidator.php:277
Stack trace:
#0 /www/profilebookscom_961/public/wp-content/plugins/toolset-blocks/application/controllers/cache/views/invalidator.php(277): array_intersect_key(NULL, NULL)
#1 /www/profilebookscom_961/public/wp-content/plugins/toolset-blocks/application/controllers/cache/views/invalidator.php(217): OTGS\Toolset\Views\Controller\Cache\Views\Invalidator->invalidate_cache_per_domain('posts', Array)
#2 /www/profilebookscom_961/public/wp-includes/class-wp-hook.php(324): OTGS\Toolset\Views\Controller\Cache\Views\Invalidator->should_invalidate_cache('')
#3 /www/profilebookscom_961/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#4 /www/profilebookscom_961/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /www/p" while reading upstream, client: 52.167.144.20, server: profilebooks.com, request: "GET /product/free-for-all-digital-audio-mp3/ HTTP/2.0", upstream: "hidden link:", host: "profilebooks.com:57528"