Cornerstone fatal PHP Error - Preview could not load due to the iframe response being incomplete

Recently I am unable to edit any posts built using the Cornerstone builder - pages are still editable. Attempting to edit a post generates the following on screen message:

“The Preview could not load due to the iframe response being incomplete. This is most often related to a plugin conflict, or customizations introducing a PHP error.”

The PHP logs report the following errors:

2022/06/15 20:38:57 [error] 8351#8351: *2549727 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /public/wp-content/themes/pro/cornerstone/includes/classes/dynamic-content/class-dynamic-content.php:361
Stack trace:
#0 /public/wp-content/themes/pro/cornerstone/includes/classes/dynamic-content/class-dynamic-content.php(334): Cornerstone_Dynamic_Content->get_first_term_for_post(Object(WP_Post))
#1 /public/wp-content/themes/pro/cornerstone/includes/classes/dynamic-content/class-dynamic-content.php(322): Cornerstone_Dynamic_Content->get_cached_first_term_for_post(Object(WP_Post))
#2 /public/wp-content/themes/pro/cornerstone/includes/classes/app/class-preview-rendering.php(218): Cornerstone_Dynamic_Content->get_contextual_term()
#3 /public/wp-content/themes/pro/cornerstone/includes/classes/app/class-preview-rendering.php(185): Cornerstone_Preview_Renderi” while reading response header from upstream

I’ve already tried turning off all plugins and child themes so it is just the Pro Theme v 5.1.5 on WordPress 5.9.3.

Any insight or ideas would be greatly appreciated.

Hello Paul,

Thanks for writing in! Do you have 3rd party plugins installed or a custom PHP code in your child theme’s functions.php file? Please do the following troubleshooting:

If nothing is helping, we would love to investigate your site. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

I have tried disabling plugins and switching to the parent theme to eliminate any conflicts and the issue persists. I’ve sent a secure note with login information for the staging site I am using to try and troubleshoot the issue.

The site does use the Toolset Types plugin to create/manage custom post types which I have left activated. A specific custom post type “Products” is the category experiencing the error - all of the products category posts are built using the Cornerstone builder.

The staging site is currently using the parent PRO theme (v5.1.5) and not the child theme. As a staging site caching and CDN are both deactivated at the server level.

I am still able to edit any Pages built using Cornerstone.

Hey Paul,

Thank you for providing more context especially the setup of the Post Type.

It is because Cornerstone reserves the product post type only for WooCommerce so regretfully, you have to rename or create a post type other than product.

Thanks.

All of the affected posts were built using Cornerstone with this post-type infrastructure in place between 2/2/20 and 8/12/21 without issue.

I renamed the custom post type however this completely breaks the connection to the Cornerstone builder. All the short code is displayed in the post editor, and if I click the option to edit with Cornerstone the builder wants to start from scratch ignoring all the existing content (which doesn’t display at all in the builder).

I have tried it using both the old CPT URL slug and using an updated URL slug, both with the same results.

Hey Paul,

Are you referring to your Ballistic Products custom post type? I checked the settings and the slug URL still using product, please change it to something else so that you can edit your post using the Cornerstone builder. As my colleague said, the product slug is a reserved word for WooCommerce using our theme.

Hope that helps.

As I mentioned, I had already tried changing out the slug and that completely breaks the connection between the page builder and the posts built out using it.

I’ve gone in an updated the slug again
image

When I attempt to edit one of these posts, all I see on the backend is Cornerstone Short codes
image

Now I’m not seeing the option at all to even use the page builder on the back end of these posts, and if I click the page builder on the front end to edit the post I get a blank screen.

Hello Paul,

Please note when you change the custom post type slug then you must enable the Cornerstone page builder for this post type. For that you need to go to the Cornerstone—>Settings —>Permissions—>General—>Click on the Custom Post type from here. I went ahead and enabled the Cornerstone page builder for this custom post type.

Please check your custom post type post and let us know.

Thanks

Thank you - I had forgotten that each post type needs to be individually activated in the builder. That fixed the issue and restored the editor functionality.

Hello Paul

Glad that we were able to help you. Please feel free to open a new thread if you have any more concerns.
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.