Error: The Preview could not load due to the iframe response

Hi,

I am unable to edit some pages and footers built using Cornerstone. I get the following error 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 console is giving this error:

app.6f62d0f.js:2 Frame missing CORNERSTONE_FRAME signature. This could mean WordPress did not shutdown properly or this URL could be cached even though Cache Control headers are present.

I checked the error log:

[13-Oct-2022 12:05:46 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type WP_Error as array in /home/customer/www/safewaves.eu/public_html/wp-content/themes/pro/cornerstone/includes/classes/dynamic-content/class-dynamic-content.php:361
Stack trace:
#0 /home/customer/www/safewaves.eu/public_html/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 /home/customer/www/safewaves.eu/public_html/wp-content/themes/pro/cornerstone/includes/classes/dynamic-content/class-dynamic-content.php(317): Cornerstone_Dynamic_Content->get_cached_first_term_for_post(Object(WP_Post))
#2 /home/customer/www/safewaves.eu/public_html/wp-content/themes/pro/cornerstone/includes/classes/app/class-preview-rendering.php(218): Cornerstone_Dynamic_Content->get_contextual_term()
#3 /home/customer/www/safewaves.eu/public_html/wp-content/themes/pro/cornerstone/includes/classes/app/class-preview-rendering.php(185): Cornerstone_Preview_Rendering->get_context_id in /home/customer/www/safewaves.eu/public_html/wp-content/themes/pro/cornerstone/includes/classes/dynamic-content/class-dynamic-content.php on line 361

I tried troubleshooting by disabling the child theme and all other plugins but the problem still appears. Also tried clearing all cache on the siteground cloud server.

These items are giving this issue:

  • Homepage
  • Footer

So I would kindly ask if you can take a look. I will add the login credentials to the secure note.

Hello @100leiden,

Thanks for writing to us.

I checked your site Dashboard, It seems that the URLs are not fully replaced while moving the site from staging to productions and that causes the issue load builder preview.

Content Builder uses the site URL settings in Settings > General . The site URL must be the same as your WP dashboard URL. If you have a different URL, it will create issues and you won’t be able to use the `Content Builder.

If it happens after migrating the site from the staging, please let me know how you made this migration. If it is a feature of your hosting service, I would request you ask them to correct those URLs.

You can also try out this article on how to update the URLs when you are moving the sites.

Also, remember that the exact URL should be mentioned in Setting > General , WordPress Address and Site URL , including the protocol i.e HTTP/HTTPS.

Hope this helps.
Thanks

Hi @prakash_s

Thanks for your reply! Updating all site urls indeed solves the problem on some pages. But I still can’t reach the German page called ‘Produkte’ in Cornerstone. I’ll get the same error. Can you investigate why this is happening?

Hi @100leiden,

I have checked the specified page and found the problem you mentioned here. I would suggest you please copy your live site to a staging server so we could troubleshoot freely without breaking your live site.
And give us access to the secure note including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Hi.

I created a staging site see the url in the secure note

Hello @100leiden,

When I go to Tools > Site Health > Info > Server, I am seeing 120 for the Max Input and PHP Time Limit. Can you please increase this to at least 300 or more? In most case, it can also cause an Error 500 which what is going on when you edit the homepage or the footer.

You may need to ask further help from the hosting provider in increase these server settings. Kindly let us know how it goes.

Thanks for your reply!

Unfortunately, increasing those php settings did not solve this issue.

Hello @100leiden,

I have investigated your issue and I found out that you have created a custom post type “Products” which is usually reserved for the WooCommerce plugin. You should have at least a product category (product_cat) and a product tag (product_tag) taxonomies added to your custom post type. If you still want to continue to use this custom post type, that you have set up, please have the slug and the post type be renamed into something else:

"rewrite" => [ "slug" => "my-product", "with_front" => true ],
register_post_type( "my-product", $args );

Or simply use the WooCommerce plugin for easier management of your products.

Best Regards.

Hi @ruenel,

That’s it! After changing the slug to something else then /products or /product I still got the error on the pages. But after changing every looper provider on the page to the new renamed post type, saving and refreshing, I finally got access to the page builder again.

Thank you very much!

Hi @100leiden,

Glad to know that you are able to access the page builder.

Thanks

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