Strange behaviour with Cornerstone and multi-language

Hello!

We activated the option to use Cornerstone to edit product description, end then created the pages in the following order:

  1. We created a product, in English.
  2. We used Cornerstone to fill the product description, with a specific layout I’m going to call Layout A.
  3. We duplicated that product using the wordpress interface.
    (At that point, wordpress created two posts in the database, one for the English Product, and one for the yet to be translated French Product. It also copied Cornerstone meta for each product, such as _cornerstone_data)
  4. We used Cornerstone to edit that second product in English, making a new layout specific to that second product. Layout B.
  5. We duplicated that second product several times, since we need to reuse Layout B.
    (At that point, each new duplicated English product contains Layout B, while the French meta is touched and still has the content of the first product with Layout A)
  6. We edited all of those new products in English, and finalized the content, all in Cornerstone.

French time! WPML offers an option to duplicate all product content as a base for the translation, including the main product description area, which contains all the Cornerstone shortcodes.

  1. For each product, we did just that, and then went into Cornerstone to edit the content.

This is where it gets tricky. The English product description contains the shortcodes for Layout B, and its associated _cornerstone_data contains data for Layout B. The French product meta contains a _cornerstone_data that has been duplicated and never modified since the original product, and describe the original Layout A with its English text.

My coworker that worked on this immediately noticed that upon loading Cornerstone on the newly duplicated French page, that the layout was completely broken. I puzzled it out for a bit, and then saw that deleting every section and starting over fixed the layout. So my coworker went his happy little way and just fixed all the French products manually, edited the content, finalized everything, etc. Hours of work.

Everything seemed to be fine, until this morning, when we returned to see all the French pages somehow reverted to the original English page with Layout A, as if all the hours of messing around did not happen.

We have no idea what triggered that, but it could have been related to me installing a WPML extension before leaving work last Friday. My investigation leads me to believe that there’s some kind of insidious bug under the hood.

I toyed around with both versions of a page that used Layout B.

Altering the layout in the English version causes the product description to change to reflect the change in shortcodes, and the one _cornerstone_data entry in the metadata is altered to reflect actual content change.

Altering the layout in the French version also changes the shortcodes, but there’s… several copies of the _cornerstone_data meta tag for it in the database, and they all contain different data. Updating the page creates a new copy instead of overwriting the existing one.

I suspect that is the root of the problem there. Is It normal that Cornerstone would duplicate its _cornerstone_data entry for each French page, while it merely overwrite the entry in the English ones? I guess the “the French pages vanished” bug was caused by having Cornerstone default to an earlier copy of _cornerstone_data, or duplicating it so the old page becomes the latest version.

Maybe you can shed some light on that strange situation? It doesn’t seem normal, and there’s clearly a few failures points there (such as the WMPL product translation features) that can cause weird effects without any warning.

Hi Ricky,

Thank you for writing in, would you mind to clarify how did you duplicate your product page?

Try utilizing the Template Manager for saving your Cornerstone Layout, and then loading that to a new page.

In the meantime, please clear all your caching features (plugin, server-side, CDN, and browser’s cache) to avoid any potential errors.

Also, please do a testing for a plugin conflict. You can do this by deactivating all third-party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Let us know how it goes,
Cheers!

Well, I have almost no plugin installed, so.

But here’s a video of how products are duplicated. Sorry for everything being super slow, we never figured out how why even the simplest WP site takes seconds to load.

As you can see, it created a new product. The english version has a post id of 302, and the French version has an id of 303.

It also duplicated all the post meta data from the original products, id 11 and 111.

As you can see in the following picture, the post 302 has only one _cornerstone_data, which kept being overwritten as I make changes. Post 303, the French one, has several entries, and a new one will appear every new change. I do wonder if that’s intended behaviour.

Hello @Filion,

Thanks for updating the thread.

To save the work and layout I would also suggest you to use Template Manager as recommended by my colleague in previous reply. To test things further, can you please share some login details (WordPress admin and FTP) in secure note for us to take a closer look.

Thanks.

We have copied all the current product pages into templates, in case something goes wrong again. As for the credentials, they will be in the secure note. If I do it correctly.

Hi,

The login provided doesn’t seem to have the right access.

You shouldn’t be creating a new page, you just need to translate the page.

Please review the link below

Hope that helps

I’m sorry, I forgot to check the box to make that account a super admin. It’s fixed now. My bad.

Hey Filion,

To translate Cornerstone content, you will need to use the Translation Flags inside the builder (see secure note).

Thanks.

We already knew that. That’s how we did it originally. That was a nice video, tho. Although, not every elements can be translated that away. Things like product titles, and short description, must be translated in the WPML Product page translator page.

That still doesn’t answer my original question. Why is the cornerstone data in the database overwritten for English pages, and duplicated into new rows in the French ones? I know it’s going deep into the inner working of the plugin, which may require the help of someone who actually worked on the plugin code, but I want to know if that’s supposed to happen. I want the reassurance that it’s not the sign of some bug, and that I won’t wake up again next week after messing around with WPML with the French pages reverted to the state of the first cornerstone data row for no discernible reason. Because my non developer coworker who, unlike me, knows nothing about code, is rather nervous about losing hours of work again.

I see. That bit has something to do with the duplication method you’re using. The data is somehow connected to the original page.

This is not a bug but regretfully is not the intended use of Cornerstone. I was also thinking of the other parts of the product page and I was supposed to edit my reply that if that is the case, Cornerstone should not be used for your products because there are parts that are outside the content area that needs to be translated and Cornerstone is not involved in that system.

I’ll forward this use case instead as a feature request. That is the proper procedure to make our development team know of this. But note that, feature request and bug reports undergo also queued and there is no guaranteed timeline to get a feedback.

Thank you for understanding.

For you benefit, I tried a different approach. It led to rather… interesting results. I made a video of it.

Since all previous attempts were based on duplicating a product, I tried making a new product… things got weird.

Since there was no section to begin with, the first load of the English product page showed no content area and an error message. I added a section, saved, and reloaded. The empty section was there now.

Then I pressed the French flag, and made a new page from blank. Again, I was met with no section, and that error message. Except, there was a section already in the list on the left, and reloading the page actually made it appear. I tried to add a text element and saved it. This time, instead of making multiple copies of the cornerstone data DB row, it deletes the old one, and creates a new one with the original English content, meaning that it’s actually now impossible to actually edit the French content.

It’s not on video, but if, instead, I create the French page by duplicating the English content instead of clicking that Blank button, this time the edits to the French pages do save, but every edit to either the French or English version adds a new cornerstone data row for the french post meta data.

Point is, it’s a mess. So long as I stay in the original language, every works fine, but as soon as I try to do anything with the other language… nothing works as it should. It’s a mess. I know you’re telling me now not to use Cornerstone, because clearly it doesn’t work, but how else will I make something neat in the product description? It’s a requirement, plain text isn’t enough, and the normal text editor for wordpress can’t do much, as far as organizing content goes. Eug.

Hey @Filion,

That "blank section: or “No suitable area” issue is a different story. That usually, is caused by broken HTML, template customizations powered by plugins that can edit templates or manual customizations, and optimization plugins. To troubleshoot if the issue is coming from Cornerstone, we need that you clear all caches in your caching plugin and deactivate all third party plugins except Cornerstone and WPML. Also switch to the parent theme. If you can’t do that in your current site, copy your site to a staging server. I believe you already know how to do that.

Regarding the duplication of data, I’ll add that to the report I have submitted yesterday.

Regarding my suggestion about not using Cornerstone, with all due respect, I suggested that for your product pages only because of your particular setup where you

I’d add now that you can instead use Visual Composer which is another page builder bundled in X also in case you don’t know yet.

Cornerstone will need to be investigated for this particular use case. Just remember that we could not give a timeline.

Please keep your site open for us to login and also keep your video links available.

Thank you for understanding.

I decided to skip on Cornerstone for now, and I settled for the far less pretty and convenient SiteOrigin PageBuilder for now (Although it kind of ran into the same issues with how WPML handles products, but I was able to find a workaround by disabling the Woocommerce WPML product translator editor and reverting to the default Woocommerce product editor, which works with any page builders (even if I’m now bombarded with WPML warnings whenever I try to use that method, but ***** them. At least it works.))

But I appreciate all the help, and I will keep those credentials and videos up until the end of September. Longer for the credentials if you need to do more testing. It’s only a template site anyway, and we will go into production onto a different site soon.

Thanks, @Filion. Since you now tried reverting to the default WooCommerce Product Editor and not the Product Translator, would you mind testing if that would work with Cornerstone as well. That might work like translating a page (see https://youtu.be/pfoPCS4_pFI)

While it does work like translating a page now, the issues I describe in my second to last post are still there. I’m going to assume that the real problem is deeper than which path you choose to go edit the translation.

I see. Those areas need further investigation.

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