Migrating from Cornerstone 2 > 4

I’m trying to migrate a Cornerstone 2 site to Cornerstone 4. I’m having issues with some custom developed elements. These are called “classic” elements in CS 4, they work ok when viewing the elements on the website. So far so good.

But in the preview mode (editing in WP) these elements are wrapped by other DOM nodes by CS. This causes a lot of layout problems. I found a new property “safe_container”, this should prevent an element getting wrapped by CS. This works ok for most parent elements, but not for elements with dynamic children. When I set safe_container to true for a child element I get the following error: “This element could not render due to invalid markup. You may have unclosed HTML tags in your content.”. Problem is that both the parent element and the child element have no unclosed HTML tags. How do I fix this?

Hello @SiteHosting,

Thanks for writing in!

As you have custom made elements, providing support for customizations falls outside the scope of support we can offer. In that regards if the custom developed elements are from a Plugin then I suggest you to get in touch with the Plugin developer.

Having said that if the elements are developed by a developer then you will have to chat with developer to provide you support.

Can you please share the login details in secure note? Maybe we can take a look and give you some pointers. I would like to let you know that we can’t guarantee a solution as we don’t maintain or provide support for custom elements.

Thanks for understanding.

Hello @Prasant, thank you. I shared login details in a secure note. I would be very grateful if you guys could find the time to give me some pointers. Thanks in advance.

Hi @SiteHosting,

I am able to see the issue on admin though FTP credentials is not working thus I am not able to check if there’s wrong on the code. I tried all possible scenarious on settings and still not able to login.

Hi @Lely, I’m so sorry. I should have double checked the FTP settings. Thank you for trying to help out. I fixed the FTP login settings, you should be able to login now.

Hey @SiteHosting,

Sorry to report that the FTP credentials are still not working.

Please check again.

Thanks.

Hi @christian_y, password and username were ok, but I created a new simpler password. Might be easier to type. Be careful if you copy-paste, sometimes you get an extra space at the end.

Hi @SiteHosting,

I’m able to access it, may I know what the issue of having it wrapped by CS? This is because it’s important to be wrapped for the parent to recognize it as a preview output, and its child. And preview output has classes that make it understandable for the builder, example, this is without safe_container (ajax template response).

<div class=\"cs-element-preview-classic {%%{class}%%}\">{%%{base64content PGRpdj5UaXRsZXM8L2Rpdj4K }%%}<\/div>

While this has safe_container

<div>Title<\/div>\n

As you can see, with safe_container, it renders as raw HTML content without placeholders. Hence making the REACTJS Library unable to determine how it should be rendered within its parent. So it’s like putting that raw HTML within the parent in which parent don’t understand (there is no any indication that it’s own child since it has no wrapper that holds the classes and identification).

Perhaps what’s needs checking is the layout issue you’re getting and how it should work based on your preference.

Thanks!

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