Skip Navigation

[Resolved] error when editing content template

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by ashodK 1 year, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2528933

Unable to edit content template
hidden link
Why is this happening and how can I fix it?

#2530025

Hello,

It is a known issue in previous version of Toolset blocks plugin with WordPress 6.1, see our erratum:
https://toolset.com/errata/fields-and-text-block-broken-with-wordpress-6-1-update/
please try to upgrade all Toolset plugins to the latest version and test again, you can download them here:
https://toolset.com/account/downloads/

#2531253

So I upgraded the blocks plugin and it worked
But I can't edit "photographs" post templates
hidden link

hidden link

Getting Critical WordPress error
hidden link

#2531473

Error Details
=============
An error of type E_ERROR was caused in line 67 of the file /nas/content/live/arfarchivesstg/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Sources/PostContent.php. Error message: Uncaught Error: Attempt to assign property "dynamic_sources_content_processed" on null in /nas/content/live/arfarchivesstg/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Sources/PostContent.php:67
Stack trace:
#0 /nas/content/live/arfarchivesstg/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/DynamicSources.php(514): Toolset\DynamicSources\Sources\PostContent->get_content(NULL, NULL)
#1 /nas/content/live/arfarchivesstg/wp-includes/class-wp-hook.php(308): Toolset\DynamicSources\DynamicSources->get_source_content('', '__current_post', 12079, Object(Toolset\DynamicSources\Sources\PostContent))
#2 /nas/content/live/arfarchivesstg/wp-includes/plugin.php(205): WP_Hook->apply_filters('', Array)
#3 /nas/content/live/arfarchivesstg/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Cache.php(92): apply_filters('toolset/dynamic...', '', '__current_post', '12079', 'post-content')
#4 [internal function]: Toolset\DynamicSources\Cache->get_data_for_sources(Array, '__current_post', '12079')
#5 /nas/content/live/arfarchivesstg/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Cache.php(49): call_user_func_array(Array, Array)
#6 /nas/content/live/arfarchivesstg/wp-includes/class-wp-hook.php(308): Toolset\DynamicSources\Cache->add_cached_data(Array, '12079')
#7 /nas/content/live/arfarchivesstg/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
#8 /nas/content/live/arfarchivesstg/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/DynamicSources.php(967): apply_filters('toolset/dynamic...', Array, 12081)
#9 /nas/content/live/arfarchivesstg/wp-includes/class-wp-hook.php(308): Toolset\DynamicSources\DynamicSources->get_dynamic_sources_data(Array)
#10 /nas/content/live/arfarchivesstg/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
#11 /nas/content/live/arfarchivesstg/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/DynamicSources.php(942): apply_filters('toolset/dynamic...', Array)
#12 /nas/content/live/arfarchivesstg/wp-includes/class-wp-hook.php(308): Toolset\DynamicSources\DynamicSources->register_localization_data('')
#13 /nas/content/live/arfarchivesstg/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#14 /nas/content/live/arfarchivesstg/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#15 /nas/content/live/arfarchivesstg/wp-admin/edit-form-blocks.php(272): do_action('enqueue_block_e...')
#16 /nas/content/live/arfarchivesstg/wp-admin/post.php(187): require('/nas/content/li...')
#17 {main}
thrown

#2531569

For the new issue, it is another known issue, see our erratum:
https://toolset.com/errata/editing-content-template-produces-something-went-wrong-you-are-not-allowed-to-do-that-error-message/

This template is showing an error because it is set to use a post/page for preview, but this post/page no longer exists on the website.

Currently, please try these:
1) Find a "photographs" post which does exist in your website, for example the post ID is 12345
2) Add the following code at the bottom of your child theme's "functions.php" file, which will replace the preview post/page ID for this template:

update_post_meta( 12081, 'tb_preview_post', '12345');

Please replace 12345 with the specific "photographs" post ID
3) Edit the content template again, if the problem is fixed, then remove the codes of step 2)

#2534013

My issue is resolved now. Thank you!