Pro builder: pages content disappears

One more thought that might make a difference here. Try adding this to functions.php of a child theme or in a custom plugin:

add_shortcode( 'cs_no_preview', function( $atts, $content = '') {
  return did_action( 'cs_element_rendering' ) || did_action( 'cs_before_preview_frame' ) ? '' : $content;
});

Then update your forms to be wrapped in the shortcode:

[cs_no_preview] Embed code here [/cs_no_preview]

That should be enough to prevent them from outputting in the preview frame. You’ll lose the benefit of seeing those forms while previewing in the builders (and Theme Options) but it will hopefully prevent React from being overwritten by that script.

Hi @alexander ,

Thank you so much for your thorough response and explanation. It’s great we know what the problem is now but what a pain!

I followed your steps on the second reply and got it working perfectly on the staging site.

I added the code to the functions.php and added the shortcode around the form on this page and it worked perfectly: https://staging.itassolutions.co.uk/pro/content/24838

However, I’ve tried the exact same thing on the live website and it won’t work. I did notice however that on the staging site the child theme isn’t the active theme whereas on the live site it is.

In the functions.php on the staging site it’s being pasted into the pro theme functions.
On the live site I tried both the child theme and the pro theme functions.php and neither of them are working. Any ideas why this might be happening?

Thank you

scrap that, I’ve got it working! sorry for the spam. Thank you @alexander really appreciate you finding the problem hopefully you will be able to include the option in the future to make life easier, is there any way of being notified if you do end up adding in the feature for raw content?

Thank you

Hello @hannahlincoln,

There is no option for notification, you would only get an update notification in the dashboard but you may check out our changelog from here.

Thanks

Hi @hannahlincoln,

The next version of Pro will have a “Disable Preview” checkbox that can be used to help avoid conflicts with 3rd party systems that bring their own React into the global scope like Hubspot’s embed code is doing.

Hi @alexander thank you for the update, really appreciate it. And thanks again for finding us the workaround in the meantime too.

Hi @hannahlincoln,

You’re welcome and it’s our pleasure to help you. If you have any other concerns regarding our theme features, feel free to reach us.

Thank you.

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