Looper with custom post type causing "Preview could not load due to the iframe response being incomplete" error in Cornerstone

Hi,

I’m working on a page that will become a layout to display products from a custom post type, “Product.” For some reason, when I set the looper provider as it should be, I get the error, “the preview could not load due to the iframe response being incomplete” in Cornerstone. This only goes away when I inspect the provider element and deactivate the looper, or set the query to something that would return no posts, then click “try again.”

For reference, my looper structure is currently:

Section [Looper Provider - Query Builder: “Product” Post Type > “Products - Equine” taxonomy]
–> Row [Looper Consumer]
----> Column [Various dynamic content pulled from looper]

The odd thing is that on the live page, the looper does work—it just breaks the preview in Cornerstone, which of course makes it very difficult to edit.

I’ve checked for plugin conflicts and tried switching to a different CPT plugin, no dice. Tried deactivating all consumers/deleting all dynamic content and noticed that the issue remains until the provider is deactivated or set to something that returns no posts. I’ve set up many pages similarly in the past to loop through custom post types without issue, so I’m at a bit of a loss here—any ideas what would be causing this issue?

Hello @2020creative,

Thanks for writing in! I could not replicate the issue when I visited the page. Just wondering what data or fields you would want to display? I edited the page in questioned and added another looper. Please check out the secure note below.

Best Regards.

@ruenel thanks for taking a look and sorry for any confusion, I took a moment to poke at it today and must have not reverted to the way it was when I made this post.

Fortunately though, I just got it working. I tested the looper with a different CPT used elsewhere on the site that I know works, and concluded that the Product CPT name and/or slug was apparently the issue—possibly getting mixed up with a page that has a similar title, not sure. But I changed that from ‘Product’ to ‘Equine Product’ and now the looper and all nested loopers function perfectly, as well as the editor.

Sorry for the trouble and thanks again for checking it out!

You are most welcome, @2020creative.

I also got the same problem using a custom port type with the name “Product” which I finally fixed changing the CPT name to “Product Line”. It also happened with a CPT named “Application” which oddly was fixed when I changed it to “Applications”.

All of this happened with WooCommerce plugin NOT being installed.

It made me think that perhaps X and Pro has some hardwired code which monitors these CPT names so that Themeco could integrate with that plugin.

Maybe this could end up in the docs as “Reserved CPT names” so nobody else has this problem?

Just my 2 cents.

Hello Rene,

If you have installed WooCommerce plugin or that you have previously installed it, creating a CPT with the same “Product” name or slug will create a conflict. This is why when creating a custom post type, it is highly recommend to choose a unique name that may not be used by the plugin.

Should you need any further information, please do not hesitate to create another thread.

Best Regards.

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