Hello!
We activated the option to use Cornerstone to edit product description, end then created the pages in the following order:
- We created a product, in English.
- We used Cornerstone to fill the product description, with a specific layout I’m going to call Layout A.
- 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) - We used Cornerstone to edit that second product in English, making a new layout specific to that second product. Layout B.
- 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) - 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.
- 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.