I am trying to edit a content template, and when I do I get the following error:
Fatal error: Uncaught Error: Attempt to assign property "dynamic_sources_content_processed" on null in /www/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Sources/PostContent.php:67 Stack trace: #0 /www/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/DynamicSources.php(514): Toolset\DynamicSources\Sources\PostContent->get_content(NULL, NULL) #1 /wordpress/wp-includes/class-wp-hook.php(308): Toolset\DynamicSources\DynamicSources->get_source_content('', '__current_post', 301, Object(Toolset\DynamicSources\Sources\PostContent)) #2 /wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters('', Array) #3 /www/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Cache.php(92): apply_filters('toolset/dynamic...', '', '__current_post', '301', 'post-content') #4 [internal function]: Toolset\DynamicSources\Cache->get_data_for_sources(Array, '__current_post', '301') #5 /www/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Cache.php(49): call_user_func_array(Array, Array) #6 /wordpress/wp-includes/class-wp-hook.php(308): Toolset\DynamicSources\Cache->add_cached_data(Array, '301') #7 /wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #8 /www/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/DynamicSources.php(967): apply_filters('toolset/dynamic...', Array, 285) #9 /wordpress/wp-includes/class-wp-hook.php(308): Toolset\DynamicSources\DynamicSources->get_dynamic_sources_data(Array) #10 /wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #11 /www/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/DynamicSources.php(942): apply_filters('toolset/dynamic...', Array) #12 /wordpress/wp-includes/class-wp-hook.php(308): Toolset\DynamicSources\DynamicSources->register_localization_data('') #13 /wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #14 /wordpress/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #15 /wordpress/wp-admin/edit-form-blocks.php(272): do_action('enqueue_block_e...') #16 /wordpress/wp-admin/post.php(187): require('/wordpress/wp-a...') #17 {main} thrown in /www/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Sources/PostContent.php on line 67
Link to a page where the issue can be seen:
hidden link
Shows WordPress "There has been a critical error on this website. Please check your site admin email inbox for instructions." page.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
I checked the duplicator package you shared but you only shared the duplicator installer file and the duplicator source not your site source. Can you please share correct duplicator package of your site.
More info:
- https://toolset.com/faq/provide-supporters-copy-site/
There is one known issue and it seems that the post you set your content template to preview with is either deleted or not exists.
=> https://toolset.com/errata/editing-content-template-produces-something-went-wrong-you-are-not-allowed-to-do-that-error-message/
Here is the related ticket where supporter mentioned the solution:
- https://toolset.com/forums/topic/templates-fail-to-open-after-upgrade/#post-2379297
In addition to that, I also check that you are using PHP version 8.1.12, there are few known issues and sooner or later you may face that so I would suggest you to use PHP 8.0.x. We already added that notice with our server requirements:
- https://toolset.com/toolset-requirements/
PHP 8.1 is currently not supported due to some issues. We’re working on fixing this. In the meantime, please use PHP 8.0 version.
I have set the next reply to private which means only you and I have access to it.
Hi there! I just wanted to confirm that your suggestion about PHP 8.1 was the issue. I downgraded to PHP 7.4 and this resolved the error. We didn't have the option to use 8.0.
When I opened the content template however I did get the other error you flagged, "Something went wrong… you are not allowed to do that":
https://toolset.com/errata/editing-content-template-produces-something-went-wrong-you-are-not-allowed-to-do-that-error-message/
I changed the content to preview and it went away per that post.
Maybe it was a combination of those factors.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Yes - it could be. Thank you for confirmation that workaround I shared worked for you. You are welcome to mark resolve this ticket.