Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

Tagged: 

This topic contains 22 replies, has 2 voices.

Last updated by enricoC-33 1 day, 4 hours ago.

Assisted by: Kor.

Author Posts
October 1, 2024 at 4:29 pm #16242079

enricoC-33

Background of the issue:
We are working on the staging version of our website and translating it from Italian to English. We are using an external translator listed under 'translation management > translators'. We obtained authorization from the translator and are sending the files using the WordPress/WPML interface and web services. A large part of the text on the website is contained in ACF fields/repeaters.

Symptoms:
The word count calculated by the translator using the XLIFF files sent via WPML web services is much higher than the words actually contained on the page. The XLIFF files contain some old revisions of the text, causing the word count discrepancy.

Questions:
Could this be a WPML bug?
How can we solve the issue of old text revisions being included in the XLIFF files?

October 2, 2024 at 3:11 pm #16246467

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

I regret any inconvenience caused, but to proceed with troubleshooting, I kindly ask for a snapshot of the site. Alternatively, with your permission, I can create one myself. For this purpose, I typically recommend using the free plugin "Duplicator." If you're already familiar with Duplicator (https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.

To guide you further, please adhere to these instructions:

1. View the Duplicator instructions video: hidden link

2. Consult WPML's instructions on providing supporters with a copy of your site: https://wpml.org/faq/provide-supporters-copy-site/

3. If the archive file exceeds 400MB, please use Duplicator's file filters to exclude cache, wp-uploads directory, media, and archive files.

Once you have the archive file ready, kindly share the link with us. You can utilize platforms like Google Drive, Dropbox, or similar for file sharing, as the snapshot file might be large.

Please note that your next reply will be private, visible only to you and me. You can paste the file link there. Rest assured that once the issue is resolved, I will delete the local site.

October 3, 2024 at 7:01 pm #16251890

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I've escalated this to our 2nd Tier Support and I will come back to you as quickly as possible.

October 7, 2024 at 7:45 am #16259291

enricoC-33

Hi, any news from the 2nd tier support team?
We're waiting for you guys to close the project and deliver the website...

October 7, 2024 at 10:53 am #16260645

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. Our 2nd Tier Support is still investigating this and I will come back to you once I've feedback.

October 8, 2024 at 5:36 pm #16267037

enricoC-33

Hi, still waiting for you guys
8 precious days passed...

Please hel us solve this problem
Thank you

October 8, 2024 at 6:09 pm #16267120

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I have a feedback and this is what our 2nd Tier Support mentioned.

I believe that the strings are picked once from the ACF custom fields, and once from the ACF blocks. I suggest that you remove any XML configuration related to these ACF blocks and try with a new post/page.
If that does not help, please try to reproduce on a sandbox to be sure it is not a general bug. Read this article to get more context, and check the client's theme to see how they are building their own blocks, so you can reproduce a minimal case.
hidden link;

I will check and revert

October 9, 2024 at 7:59 am #16268389

enricoC-33

Hi, thanks for your reply!

In the last few hours we had to rush with translation because the project was way too late on its schedule.

So at this moment we already managed to translate with our partners the contents we needed, and we cannot try publishing a new post/page, maybe we can do that later in a development environment just to try to figure out if it's a bug or a feature 🙂

Since you have a clone of the staging site, a test/check/action on your side would be really appreciated.

By the way, we can't find the plain XML but we found the settings that seems to populate that XML, in WPML -> Settings.
In the custom fields area we can see all the custom fields we created with ACF and the required ones are flagged correctly in our logic. We can't find any duplicate in the list, these are all the ACF fields we created to compose the blocks we used in Gutenberg but, for some reason unknown, in the XLIFF we submitted to our translating partner there are ACF fields populated and Gutenberg blocks populated, some with duplicated content, some with revision related content.

October 9, 2024 at 5:07 pm #16271846

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I've created a new page here hidden link using the same custom field and I'm not seeing any issues with duplicates when I open the advanced translation editor.

Do you remember performing any changes to the site when the issue happened? Also, does it happen to all pages or just specific ones?

October 9, 2024 at 7:54 pm #16272283

enricoC-33

Hi, I do not remember any changes to the site when the field duplication happened.
The site was "freezed" to allow the professional translator to work.

Newly created pages seem to work well and absorb all the correct ACF settings.

Old pages, already translated (in this case by the professional translator and sent to us via WPML webservices) do not.

It's like there is a sort of "cache" or some "garbage layer" that prevents the old pages/contents from acquiring the correct settings.
By the way, we already cleaned WPML cache.

For example:
- home page uses some specific ACF field groups: each one is marked to NOT translate labels. (see screenshots 01 and 02)
- so in WPML translation editor for home page, all ACF labels, field groups titles, etc should NOT appear.
- but, inexplicably, field groups "Home - 03. Scritta animata", "Home - 04. Immagine a piena pagina", "Home - 06. Consorzio" and variuos fields appear in translation editor. (see screenshot 03).

There is a lot of "garbage" like this around.

Another example:
- translator editor for page "La storia" hidden link includes old revisions of some ACF fields (and that caused the duplication problem in the XLIFF files)
see screenshots 04 and 05

Again, those translations were pushed via webervices by the professional translator.

So the help we need is:
- remove the "garbage layer" and let the old pages/contents acquire the new settings. Of course without losing the translations already performed.

05 transl editor for page LA STORIA.png
04 transl editor for page LA STORIA.png
03 translator editor for home page.png
02 acf field group 06 for home.png
01 acf field groups for home page.png
October 9, 2024 at 7:57 pm #16272371

enricoC-33

PS please be *extra careful* in doing any modification to our (staging) site: we are now using it to prepare migration to production. Use your cloned version if you need to experiment.

October 10, 2024 at 3:23 pm #16276269

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for your response.

I have some feedback from our 2nd Tier Support team. They mentioned that since this issue cannot be replicated on your new pages or posts, we will need to manually remove the post meta from the database.

As you are finalizing the site and preparing for migration, I recommend recreating the problematic pages if there aren't too many. This way, we can avoid making changes to the database, which would require phpMyAdmin access.

Let me know what you think.

October 10, 2024 at 3:30 pm #16276278

enricoC-33

Hi, there are too many pages to recreate and their content is too complex for the timeframe we have.

No problem to perform sql/phpMyAdmin operations

Just send us the proper, detailed, TESTED queries and we will execute them to clean up the "garbage" on the existing content (posts, custom posts -for recipes-, pages).

Many thanks

October 10, 2024 at 3:51 pm #16276367

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for your response.

Here's what you can do: Please log in to your database and examine the POSTS and POSTMETA tables. You'll notice that both the new and old versions are present in the POSTMETA table: hidden link . This duplication occurs because the content is attached to the page as the body (Gutenberg) and also as a postmeta entry (custom field).

To resolve this, you can use the POST_ID as a reference. In the postmeta table, restrict your search using the post_id you're interested in, and from there, you'll be able to identify the old entries and remove it.

Please backup before you proceed and let me know how it goes.

October 15, 2024 at 10:05 am #16289849

enricoC-33

Hi, to test your suggestion we deleted a row in our database, both on italian and english post, of a acf custom field we don't want to appear in the translation editor.

See screensot 01, the field is "Titolo pagina"
it was deleted in the post_meta table
But it remains in the WPML translation editor.

Is there something cache related on your side or what is the issue?
IN WPML > troubleshooting we already deleted th WPML cache.

01 field deleted from db still appears in transl editor.png

The topic ‘[Closed] Text revisions included in XLIFF files?’ is closed to new replies.