Resolved
Resolved in: WPML String Translation 2.5.4
Overview of the issue
In some cases, when a string coming from a page builder is updated, the old version of the string is still showing in the Translation Editor.
Workaround
This issue will be fixed in next version of WPML String Translation. In the meantime, you can use the following patch.
In the ../wpml-string-translation/classes/page-builders/class-wpml-pb-string-translation.php file, on line 103, replace:
if ( ! $this->is_job_in_progress( $job_id ) ) {
With:
if ( ! $job_id || ! $this->is_job_in_progress( $job_id ) ) {
For existing translation jobs with duplicated fields, please follow the steps bellow (after adding the patch):
1. Go to the editing screen of the page that features the strings in question.
2. Make sure no translation jobs are currently “in progress”.
3. If a job is in progress, complete it first.
4. Go back to the page editing screen and click on Update.
5. Open the translation editor again and the duplicated fields should be removed.
where i find this ?? “In the classes/page-builders/class-wpml-pb-string-translation.php file”
greetings
Hello @rahelH-2,
The file path was incomplete, we just updated it in the description. You will find it in “sitepress-multilingual-cms/classes/page-builders/class-wpml-pb-string-translation.php”.
Regards,
Pierre
Hi, I have the same problem but do not have the /page-builders/ sub-dir……..
My apologies @ronL-4, it is in WPML String Translation plugin. Please edit the file “wpml-string-translation/classes/page-builders/class-wpml-pb-string-translation.php” (Corrected in the description).
Thanks,
Pierre
Hi Pierre, seems to be OK now! With Divi btw.
Will investigate further.
thx
Regards,
Ron
That modification does not currently work for Visual Composer.
Hi George,
Could you please open a ticket on the support forum with the detailed steps to reproduce your issue? You will get a dedicated assistance.
Regards,
Pierre
I have already done, thanks.
I have exactly the same problem with Visual composer. The same field shows up repeatedly in translation manager and old strings/texts just linger on. Looking forward to your reply!
Hi Charlotte,
We will investigate this issue with Visual Composer in a specific ticket https://wpml.org/forums/topic/duplicate-content-on-visual-composer-on-translation-editor/#post-1276504. Please subscribe to follow the conversation.
Thanks,
Pierre
I’ve changed the code in the php file as suggested and am still seeing the old strings in the translation screen. I’m using the Divi Theme. I’ve tried updating the English (primary) page and then going back to the translation screen and that did not fix the problem.
Hello Mark,
In order to refresh the fields in the translation editor, the translation job needs to be “completed”.
Can you make sure you don’t have any jobs “in progress” before to update the original page (in English in your case)? If you are still facing the same issue, please open a ticket on the support forum and paste the link here.
Thanks,
Pierre
Thank you. Yes, the problems were with translations that were in progress. After I completed one of them, I saw that the duplicates are now gone.
One more important thing though. It looks like brand new translations, one that were not in progress before this fix, still have all of the duplicate fields. I don’t want to have to go through every new page that I haven’t translated yet (this is a brand new site), and mark them all as completed so that the duplicates go away. Any way around this?
Thanks!
Mark,
When you translate a page for the first time, (click on the “+” icon), a new translation job is created. At this point, with the patch of course, you should not have any duplicated field.
The only problems are:
– When a “completed” translation exists with duplicated fields, you need first to click on “Update” on the original page.
– When a job is “in progress”, you need to complete it before anything else, otherwise, the fields are not refreshed.
If you have several jobs “in progress”, you can also go to WPML -> Translations where you will see all the pending jobs (make sure you have the required language pairs as a translator).
Thanks,
Pierre
I’m also getting duplicate content and I was hoping this patch would work. I can’t seem to find that php to make the change though.
Hello Richard,
The patch has been added to the latest version of WPML String Translation 2.5.4. Please update WPML and add-ons to fix your issue. If you still have problems after the update, could you please open a ticket on the support forum?
Note that if you have some jobs with already duplicated fields, you need to follow the steps mentioned in the description.
Regards,
Pierre