WPML fails after upgrading X to Pro

I recently updated from Theme X to Pro.

I’m using WPML and it used to work fine using WPML advanced translation editor (and automatic translation) with Theme X/Cornerstone.

Now it does not work anymore. I do the following:

  1. Edit original page in normal wordpress editor. Find the language settings in the toolbar to the right. Here I engage “Use WPML’s Translation Editor”. Then I click the pencil for the new language.

  2. Translation editor opens and automatically translates all the content from Cornerstone. This is great! I click “Completed” and the new translated page is created and saved.

  3. Then I check the page in the new language. It only has the page title.

  4. If I go edit the page in Cornerstone it asks to start empty, from a template or copy content.

  5. If I go to the normal wordpress editor for the new language page I see the Cornerstone shortcodes in the page block. It doesn’t seem to “connected” to the Cornerstone editor.

If I look in MySQL wp_post_meta table I can see the translated page id is missing ‘_cornerstone_data’, ‘_cornerstone_settings’ and ‘_cs_generated_tss’ (these are populated in the original post). I’m guessing my problem is a WPML and Pro incompatibility issue?

Please help! This used to work in Theme X/Cornerstone and now it doesn’t?

Best regards,

Peter

Hi Peter,

Thanks for reaching out.
It will be difficult to recognize without investigating through the admin dashboard. Can you please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

1 Like

Thank you Tristup!
Please let me now if I can help!

Hey @pfavr,

The “WPML’s Translation Editor” function should not be used as that creates a new translation page that is not connected to Cornerstone.

If you wish to translate a Cornerstone-built page, you should use the Translation Flags within the builder.

When you said that it worked before, you might be referring to the old Cornerstone when only Classic Elements exists. The said version is compatible with WPML’s Translation Editor.

The version when the V2 elements were added uses the manual translation method and that is done using the Translation Flags. You should use that moving forward.

Thanks.

Hi Christian, thank you very much for the answer.

You write the classic elements work but not the V2 elements.

I’m quite sure the V2 elements worked also before we upgraded X to Pro?

The reason for using the translation editor is the automatic translation using e.g. Google or DeepL. This is not possible using the manual translation inside Cornerstone?

Looking in the MySQL tables I can see the translation works OK - the only problem is the Cornerstone meta data is missing for the translated post. Hence the page looks empty (because the cornerstone shortcodes are not expanded, even though they are translated OK).

Don’t you think this is a problem with Cornerstone being integrated in Pro and not a separate plugin as before when we used X+Cornerstone?

If I’m right about the translated data in MySQL being OK, but CS metadata missing - is this something you could fix in an upcoming release of Pro?

Thank you for your help!

Best regards,

Peter

Hey Peter,

It is normal that the translated page using WPML’s Translation Editor does not have the _cornerstone_data and the rest of the database entries associated with Cornerstone because it is not yet translated using Cornerstone.

Regretfully, we cannot fix nor go back to make the WPML Translation Work. As mentioned in my previous reply, that will only work for Classic Elements or if the page was built using ALL Classic Elements.

WPML Translation Editor won’t really work for V2 Elements and that has been the case for a long time now.

Please use the Translation Flags or Translate within Cornerstone and not the WPML Translation Editor.

Thanks.

Hi Christian,

Thank you very much for the reply!

You write I should translate using the flags/within cornerstone: this is just one mechanism, not two, right? (just clicking the language switcher within cornerstone)?

As said previously we would really like to use the WPML Advanced Translation Editor as this allows for automatic translation using DeepL.

I do understand that you are opposing this, but to my best knowledge, this worked fine using X before upgrading to Pro. And yes - also with V2 elements

Then I upgraded to Pro and now it doesn’t work anymore.

That is - the translation works, but the cornerstone stuff is missing from the page so it will not be shown. Also the translated page is not seen by Wordpress as a Cornerstone page.

If you’re right and I’m wrong :slight_smile: then can’t you fix it in the next update?

You say it worked using V1 elements… was this without the _cornerstone_data etc (database entries in wp_post_meta)?

If yes - then it should be possible to make it work using V2 also I guess?

The interesting part is, that looking in MySQL the original language page and the translated page (using WPML Advanced Translation Editor) looks the same (except for the translated content):

[cs_content][cs_element_section _id="1" ][cs_element_layout_row _id="2" ][cs_element_layout_column _id="3" ][x_gap size="400px"][/cs_element_layout_column][/cs_element_layout_row][/cs_element_section][cs_element_section _id="5" ][cs_element_layout_row _id="6" ][cs_element_layout_column _id="7" ][cs_element_global_block _id="8" ][/cs_element_layout_column][/cs_element_layout_row][/cs_element_section][cs_element_section _id="9" ][cs_element_layout_row _id="10" ][cs_element_layout_column _id="11" ][cs_text _bp_base="3_4"]
<h1 style="text-align: center;">Ztove - sæt</h1>
Kom godt igang med den fulde Ztove oplevelse. Vi har sammensat forskellige kombinationer af kogeplader og medfølgende kogegrej. Så skal du blot downloade appen og gå igang med perfekt madlavning. Hver gang.
[/cs_text][/cs_element_layout_column][/cs_element_layout_row][/cs_element_section][cs_element_section _id="13" ][cs_element_layout_row _id="14" ][cs_element_layout_column _id="15" ][cs_text _bp_base="3_4"][products category="sæt" limit="6" paginate="true" orderby="best"][/cs_text][/cs_element_layout_column][/cs_element_layout_row][/cs_element_section][cs_element_section _id="17" ][cs_element_layout_row _id="18" ][cs_element_layout_column _id="19" ][cs_element_global_block _id="20" ][/cs_element_layout_column][/cs_element_layout_row][/cs_element_section][/cs_content]

This is the translated page “post_content” from MySQL:

[cs_content][cs_element_section _id="1" ][cs_element_layout_row _id="2" ][cs_element_layout_column _id="3" ][x_gap size="400px"][/cs_element_layout_column][/cs_element_layout_row][/cs_element_section][cs_element_section _id="5" ][cs_element_layout_row _id="6" ][cs_element_layout_column _id="7" ][cs_element_global_block _id="8" ][/cs_element_layout_column][/cs_element_layout_row][/cs_element_section][cs_element_section _id="9" ][cs_element_layout_row _id="10" ][cs_element_layout_column _id="11" ][cs_text _bp_base="3_4"]
<h1 style="text-align: center;">Ztove - set</h1>
Ga aan de slag met de volledige Ztove-ervaring. We hebben verschillende combinaties van kookplaten samengesteld en kookgerei meegeleverd. Download dan gewoon de app en ga aan de slag met perfect cooking. Elke keer.
[/cs_text][/cs_element_layout_column][/cs_element_layout_row][/cs_element_section][cs_element_section _id="13" ][cs_element_layout_row _id="14" ][cs_element_layout_column _id="15" ][cs_text _bp_base="3_4"][products category="sæt" limit="6" paginate="true" orderby="best"][/cs_text][/cs_element_layout_column][/cs_element_layout_row][/cs_element_section][cs_element_section _id="17" ][cs_element_layout_row _id="18" ][cs_element_layout_column _id="19" ][cs_element_global_block _id="20" ][/cs_element_layout_column][/cs_element_layout_row][/cs_element_section][/cs_content]

This works alright (I don’t know if the above is V1 or V2 elements - but they don’t look wrong/different in the translated page!).

So only thing that seems to be missing is that the translated page should also be filtered through the Cornerstone filter to produce the right output when the page is viewed?

If yes - can this be done by copying the wp_post_meta cs_data from the original page to the translated?

And how did this work using the “old” cornerstone V1 elements - was this copying taken care of automatically?

I still believe it did work in X before I upgraded to Pro…

Thank you very much for your help in solving this, and sorry if I’m stubborn, but this is really important to us!

Best regards,

Peter

Hi Christian,

I just restored an old image of our server from when it was running X (not Pro).

And confirmed translating using the WPML Editor works on Cornerstone pages.

The data in wp_posts and wp_meta are different though. Compared to our current server running Pro the wp_posts content is not translated and the wp_postmeta entries are duplicated to the translated post_id (with the actual text translated as it should be).

It seems we did a mistake upgrading to Pro as WPML is not working as well as in X?

Please let me know if I can help investigate this further?

Best regards and thank you for your help,

Peter

Hey Peter,

The shortcodes you posted are Classic elements. You know they’re Classic because the actual Text is available in the content. If you open the page in the builder, they look like the following screenshot.

image

To prove my point, I created a test page on your staging site (see secure note). The test page only contains Classic elements.

As you can see in the screenshots below, even if you’re using Pro 5.1.4, you still can use WPML’s Translation Editor. The only condition is you need to use Classic Elements.

This is not because of Pro or your upgrade with Pro. If you update X and Cornerstone to the latest version, you’ll still get the same result.

If WPML Translation Editor is very important to you, please go to WP Admin Menu > Cornerstone > Settings and disable all V2 elements as shown in the screenshot below. After you click Apply, click the Update button.

Remember that if you wish to use the WPML Translation Editor, you should not use the Builder’s Translation Flags contrary to what I suggested previously. I suggested the Translation Flags if your content uses V2 elements.

Hope that is clear now but if not, give us access to your site that you’ve reverted to old X version so we can compare and show you some more screenshots.

Thanks.

Thanks again Christian for you informed reply.

You write I’m using classic elements and hence the WPML editor works. I agree.

This is not the problem.

The problem is - using Pro - when I make a Cornerstone page and then translate it to another language using WPML editor - then the page (post_content) are correctly translated and stored in MySQL wp_posts. But the post_meta entries for the new translated page is not created (I don’t know if it should or if it matters), and the translated page is not seen by Wordpress as Cornerstone content. The translated content will not show up on the website. And if I open the page using Cornerstone it will prompt me to use blank, template or copy other page…

So to summarize, I think you say: “Using only classic elements it should work (on our staging server)”.

But it doesn’t work - i.e. the translation editor works when I try on our staging (or production) server, but (and this is the error!): the page will not show up after translation is completed! It is missing something to make it work. This is true even when using classic elements only!

This “missing something” - is not missing in our old server image from before upgrading to Pro from X. Here it works as it should.

I hope I have explained it better now?

Thank you for your help!

Best regards,

Peter

Hi Christian,

You’re probably busy, but please can you (or anybody else) help?

Best regards,

Peter

Please help?

Hey @pfavr,

I see what you mean now and the cause is the [cs_content] shortcode. Something must have changed with that shortcode so I’m going to post this in our issue tracker so this case will be queued for investigation.

For now, the temporary solution for the translated page to work is to edit the page in WordPress then remove the opening and closing [cs_content] shortcode.

image

Check the test page I’ve previously created to see that it’s working.

Note that everything that I’ve said previously holds true. You only should use Classic Elements.

Thanks.

1 Like

Thank you Christian for looking at it again and submitting to the issue tracker!

I do understand the part about the classic elements, but do you know if it is planned to add support for the V2 elements in WPML translation editor as well?

Best regards,

Peter

Hello Peter,

We already have added it as a feature request.

Thank you for your understanding.

1 Like

Thank you @ruenel!

Any estimated time of arrival for supporting the V2 elements also?

Best regards,

Peter

Hi Peter,

We don’t have any estimated time for supporting the V2 elements but rest assured that our developers will check on the feature request.

Thank you for understanding.

Thanks!

Can I follow the progress somewhere?

Please let me know if I can help test the V2 elements?

Best regards,

Peter

Hi Peter,

Unfortunately, there is no option to see the progress on this. And our development team will let you know if anything is required.

Thanks

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