PHP: 8.2.24
Wordpress: 6.7.1
Server: nginx/1.21.4
WPGraphQL Smart Cache: 1.31.1
WPGraphQL: 1.26.0
WPGraphQL for ACF: 1.3.3
Regardless of the versions of WPGraphQL, WPGraphQL Smart Cache and WPGraphQL for ACF (I tried different versions in different combinations, including old ones), when the setting in the plugin WPGraphQL “Enable GraphQL Debug Mode” is enabled, an error is returned in the response to the query:
{
"errors": [
{
"debugMessage": "Serialization of 'Closure' is not allowed",
"message": "Internal server error",
"extensions": {
"category": "internal"
}
}
]
}
And in the server logs (error.log) the error looks like this:
Exception: Serialization of 'Closure' is not allowed in /wp-content/object-cache.php:2838
Stack trace:
#0 /wp-content/object-cache.php(2838): serialize()
#1 /wp-content/object-cache.php(2227): WP_Object_Cache->maybe_serialize()
#2 /wp-content/object-cache.php(294): WP_Object_Cache->set()
#3 /wp-content/plugins/wpgraphql-smart-cache/src/Storage/WpCache.php(39): wp_cache_set()
#4 /wp-content/plugins/wpgraphql-smart-cache/src/Cache/Query.php(102): WPGraphQL\SmartCache\Storage\WpCache->set()
#5 /wp-content/plugins/wpgraphql-smart-cache/src/Cache/Results.php(255): WPGraphQL\SmartCache\Cache\Query->save()
#6 /wp-includes/class-wp-hook.php(324): WPGraphQL\SmartCache\Cache\Results->save_query_results_to_cache_cb()
#7 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#8 /wp-includes/plugin.php(517): WP_Hook->do_action()
#9 /wp-content/plugins/wp-graphql/src/Request.php(564): do_action()
#10 /wp-content/plugins/wp-graphql/src/Request.php(431): WPGraphQL\Request->after_execute_actions()
#11 /wp-content/plugins/wp-graphql/src/Request.php(705): WPGraphQL\Request->after_execute()
#12 /wp-content/plugins/wp-graphql/src/Router.php(464): WPGraphQL\Request->execute_http()
#13 /wp-content/plugins/wp-graphql/src/Router.php(257): WPGraphQL\Router::process_http_request()
#14 /wp-includes/class-wp-hook.php(324): WPGraphQL\Router::resolve_http_request()
#15 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#16 /wp-includes/plugin.php(565): WP_Hook->do_action()
#17 /wp-includes/class-wp.php(418): do_action_ref_array()
#18 /wp-includes/class-wp.php(813): WP->parse_request()
#19 /wp-includes/functions.php(1336): WP->main()
#20 /wp-blog-header.php(16): wp()
#21 /index.php(17): require('...')
#22 {main}
If you disable the WPGraphQL for ACF plugin, but leave the WPGraphQL Smart Cache plugin running, everything works without errors.
To prevent the error from occurring with all plugins enabled, only disabling the “Enable GraphQL Debug Mode” setting helps.


PHP: 8.2.24
Wordpress: 6.7.1
Server: nginx/1.21.4
WPGraphQL Smart Cache: 1.31.1
WPGraphQL: 1.26.0
WPGraphQL for ACF: 1.3.3
Regardless of the versions of WPGraphQL, WPGraphQL Smart Cache and WPGraphQL for ACF (I tried different versions in different combinations, including old ones), when the setting in the plugin WPGraphQL “Enable GraphQL Debug Mode” is enabled, an error is returned in the response to the query:
And in the server logs (error.log) the error looks like this:
If you disable the WPGraphQL for ACF plugin, but leave the WPGraphQL Smart Cache plugin running, everything works without errors.
To prevent the error from occurring with all plugins enabled, only disabling the “Enable GraphQL Debug Mode” setting helps.