Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues with the synchronization of translations when reordering Flexible Content Layout Blocks in a site built with ACF Pro and WPML. This causes the content in translated pages to go out of order, even though the headings remain unchanged.
Solution:
We recommend the following steps to address the issue:
1. Make a full backup of your website.
2. Delete the translations of the affected pages by visiting the Pages tab, switching to a secondary language, and sending the translation to the trash. Then, permanently delete the post from the trash for all secondary languages.
3. Go to WPML > Settings > Translation Editor and adjust settings as needed.
4. Make a small change to the default language post (e.g., add a blank space to a custom field text). This step is crucial as it invalidates the current translation job and forces WPML to create a new one with the correct Repeater fields order, as described in the errata.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Josh 6 days, 7 hours ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
November 4, 2024 at 5:30 pm #16362505

Josh

Background of the issue:
I’m troubleshooting a site that I took over from the client’s previous developer which was built with ACF Pro and WPML. The site is using Flexible Content for the Blocks, and each of the Layouts have several custom fields. I tried adding add_filter('wpml_sync_deleted_custom_fields', '__return_true'); to my functions file. I have also seen the same issue reported by others, and a known bug by WPML which is still set as Open. https://wpml.org/errata/advanced-custom-fields-multilingual-reordering-repeater-fields-makes-the-translations-unsynchronised/ I have read through the ACFML documentation and made tweaks where needed (except replacing all Filed Names yet); https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#translating-repeatable-sub-fields Link to a page where the issue can be seen: hidden link

Symptoms:
When reordering Flexible Content Layout Blocks, it unsynchronizes the translations, causing the content in the translated pages to go out of order. The headings do not change order when the content moves correctly. The issue persists even after renaming field names and testing on a clean installation.

Questions:
Are there any known solutions where the ACF Flexible Content block layouts keep their order once the primary language is updated?

November 4, 2024 at 6:28 pm #16362883

Josh

I took the advice from the support rep who was helping me;
- Delete all translations and permanently delete from trash (all translation languages).
- Change WPML to Advanced Translation Editor (from Classic).
- Went back to post to test, saved content, and then added translations, and saved.
- Then re-ordered blocks, and same result > content moved to proper location and the Heading stayed where it was, causing out of sync translations.

You can see in the attached screenshot, now content is no longer there in the translation after re-ordering the primary language... it just disappeared? Very strange.

I then tried creating a brand new post, adding blocks and content, translating them quickly, and then re-ordrring the primary language. Also, same issue where the content moves to the appropriate location while Headings stay in their previous location [second screenshot].

same issue - advanced editor.jpg
missing content after reordering.png
November 4, 2024 at 6:34 pm #16362910

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

It seems you are missing an important step. It's described in the errata:

"make a small change to the default language post. This will invalidate the current translation job and will force WPML to re-create a new one with the right Repeater fields order."

Also in the message I sent with the instructions:

"If you want to change the order of the posts, please also make a change to the content before saving. You can add a blank space to a custom field text, for example. That way, WPML will recognize the changes."

Have you also made the changes to the content when reordering the fields? I apologize in advance, in case you have done that already.

November 4, 2024 at 7:00 pm #16363035

Josh

Hi Lucas,

Thanks for the replies!

For the tests, after I deleted the translations I updated the post before going to the translations. Is that not enough to reset WPML translation status?

For the second test, I created a brand new post and had the exact same issue. There could not be any previous translations to that one. [see attached the same screenshot from above].

For this one, only the Advanced editor was used.

I guess my next question would be, if we need to make many updates to several posts; would we then have to delete all translations, make changes to primary, and then re-add the translated content each time? If so, that would not seem like a very convenient solution, as there is a lot of text, and the advanced editor breaks up content which adds even more time to re-input data.

same issue - advanced editor.jpg
November 5, 2024 at 1:09 pm #16366856

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there

For the tests, after I deleted the translations I updated the post before going to the translations. Is that not enough to reset WPML translation status?

Yes. When translatable content is changed inside an original post, the translations status will get updated.

if we need to make many updates to several posts; would we then have to delete all translations, make changes to primary, and then re-add the translated content each time?

Not exactly. Let me explain. There are apparently 2 issues:

1. You are using the Classic Editor for your translations, which is not recommended anymore. We have a more stable, newer version which should be used. The one I recommended.

2. We have a bug that's being addressed by our devs. The bug is that the order of the fields don't get updated automatically in translation, when changed in the original. It's described here:
https://wpml.org/errata/advanced-custom-fields-multilingual-reordering-repeater-fields-makes-the-translations-unsynchronised/

The solution, in your case, is to change to the Advanced Translation Editor (that needs to be done only once for every post), and then update the original post's content, so that the translations can be updated as well.

Bottomline is: to change the order in the translations, you need to make a small change in its content and update the translation using WPML's most recent translation editor. You don't need to recreate everything from scratch everytime. Just make a small change and update the translation. Makes sense?

November 5, 2024 at 8:22 pm #16369095

Josh

Hi Lucas,

Okay I see the points you are emphasizing. I will run some tests and let you know how it goes.

Thanks!

November 6, 2024 at 11:30 am #16371236

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Perfect. I'll be here.

November 6, 2024 at 4:46 pm #16373995

Josh

Hi Lucas,

I restored a backup of the site's current version and tested again from the beginning.

I followed the steps:
1. Delete the translations of the page. To do so, visit the Pages tab, switch the language to a secondary one and send the translation to the trash;
2. Visit the trash can and permanently delete the post. Do that for all secondary languages;
3. Go to WPML > Settings > Translation Editor and select "Advanced Translation Editor (recommended)" under "Editor for new translations";
4. Add the translations to the post using the new Editor

For starters, I'm a little confused as to why deleting the translations of a page already translated is necessary, because the translations will then be removed and have to be manually re-added. There are hundreds of posts already translated. However, I tried this method.
A) For this, after permanently deleting the post translations for each language, I switched to the Advanced Translation Editor (ATE), then went back to the primary language and made a small update to the post, then went to add the translations for each language (on the post I am testing) and now run into a new issue where the ATE won't let me save a section without including the "formatting markers" for the links in the primary language, yet the translation (that was previously there) is not adding those links; which now won't let me save the translation and doesn't let me override and complete. [see attached image > "Formatting Markers.png"]

Formatting Markers.png
November 6, 2024 at 4:46 pm #16374010

Josh

B) I decided to try another route and go to another post (where the translations were not deleted), make a small change to the primary language and update, then when I go to the translation of the page, the translated content is no longer showing in the ATE (however the front-end translations are still there and in good form). [see attached image > "translations dissapear.jpg"]
*To me, this again would require a manual copy/paste of all the content back into each field in the ATE... or is there another way to have the content sync to the ATE?

translations dissapear.jpg
November 6, 2024 at 4:51 pm #16374090

Josh

C) After switching to the ATE, a new icon appears in the Admin with notifications that its "Updating affected posts for changes in translatabled custom fields", which seems never ending. Also, it seems only to move to the next sequence on a pageload/refresh which also makes me not know how much there is left to do. [see attached image > "advanced editor updates.jpg"]
- Is this normal, and is there a way to see the full list and completion rate, or make it run in the background?

Coming back to my question: "if we need to make many updates to several posts; would we then have to delete all translations, make changes to primary, and then re-add the translated content each time?"
And what you replied: "The solution, in your case, is to change to the Advanced Translation Editor (that needs to be done only once for every post), and then update the original post's content, so that the translations can be updated as well."

I am also aware of the bug with regards to "order of the fields don't get updated automatically in translation"... so is there a better workaround to this rather than switching to the ATE and losing all the work done previously?
*If there bug is present with the ATE as well, I'm not quite sure how this resolves much in my case.

I do not mind switching to the ATE for all posts, however, I do mind having to re-input all the data back in manually.

advanced editor updates.jpg
November 6, 2024 at 4:55 pm #16374109

Josh

I did have a manual workaround for the ordering of the Blocks, however, the issue there is when I set WPML to use the WordPress Editor for translations and removed the sync of the repeater and flexible sub-fields in the same order as the default language, then I was able to manually update each translations.

The only issue with this though, is that when choosing to translate posts this way, we cannot send those posts for Translation Services, which we also need and have been using.

Is there is a way to use Translation Services with the manual updating of each page using the WordPress Editor? If so, then this can be a viable solution.

November 6, 2024 at 7:01 pm #16374393

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

I'm still checking. I'll be back once I have a feedback. Thank you for your patience.

November 7, 2024 at 1:42 pm #16377731

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

I understand this solution is a bit of a hassle. The point is that the usage of the new ATE is the recommended way of translating. The Classic Editor is slowly being removed, as we have better options now.

As for the HTML markers, you have to select a word/sentence in the translation and click on the colored circles to add the tag to the text. You'll be able to save when the html tags in the translation match the original.

Just to confirm: were you able, in the end, to update the posts as expected?

Is there is a way to use Translation Services with the manual updating of each page using the WordPress Editor?

Yes, the Translation Editor has actually no impact on that. You can send the posts for external translation as you always did. Let me know if you have any more specific questions on that.

November 7, 2024 at 4:28 pm #16379112

Josh

Hi Lucas,

Thanks for the replies.

I know it's recommended to use the ATE, however the site was already set up using the Classic editor, so what I'm getting from your solution is having to re-add all the content for each of the 5 non-primary languages? That does not seem like a good solution.

For the HTML markers, the translation does NOT have any links in the translation. Why am I forced to add markers when I don't want them? Is there a manual override to tell the ATE that the translation is complete, because the author says so?
*This is an issue in the UI/UX of the ATE in my opinion. I've been building with WPML since 2011, and I actually have not liked the ATE since there have always been little issues like this one.

When you phase out the Classic Editor, how will clients convert their content over to the ATE? Will customers be asked to re-input all their translation data, or will there be a converter for this?

As well, switching to the ATE still does not solve the re-ordering issue. Therefore I don't see the need of the unnecessary hours to get to the same end result.

"Is there is a way to use Translation Services with the manual updating of each page using the WordPress Editor?"
- My bad on this explanation (I've tried so many things)... about the manual workaround, when I change the Block ACF Field Group's Multilingual Setup to 'Different fields across languages' is when we lose the ability to send posts to Translation Services.
- So with the different fields across languages chosen, then we there is no way to send the posts for Translation Services.
> Is there a way to use "Different fields across languages" and send posts for Professional Translation Services?

Thanks!

November 7, 2024 at 7:24 pm #16379795

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

I would like to access your website. I want to check if the solution I suggested works in the first place, and if there's something more practical that can be done in Bulk. Sounds good?

I'll check the issues you brought, one by one, to address them.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:

hidden link