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.

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

Problem:
When the client fetch translation from his translation service, he finds that the downloaded translations have mixed content between the original and translated language

Solution:
This is a bug, we will fix it in a future version. In the meantime, here's a patch to fix the issue on your side with version 4.0.7:

Edit the file `wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/class-wpml-pb-integration.php` on line 114 and replace:

public function cleanup_strings_after_translation_completed( $new_post_id, array $fields, stdClass $job ) {
    if ( 'post' === $job->element_type_prefix ) {

With:

public function cleanup_strings_after_translation_completed( $new_post_id, array $fields, stdClass $job ) {
    remove_action( 'icl_st_add_string_translation', array( $this, 'new_translation' ), 10 );
    if ( 'post' === $job->element_type_prefix ) {

Relevant Documentation:
https://wpml.org/documentation/translating-your-contents/professional-translation-via-wpml/

This topic contains 73 replies, has 5 voices.

Last updated by michelleH-5 11 months, 4 weeks ago.

Assigned support staff: Ahmed Ibrahim.

Author Posts
July 16, 2018 at 12:44 pm

michelleH-5

Hi,

I've noticed that a few of our pages, despite the content being edited last week are re-setting back to the original source language used to translate them.

So, in our situation we built the English US language site first, and then using WPML, we created the English GB and English AU sites. The English GB and AU sites were manually created using WPML 'Add translations to English (GB)/(AU)' option and then I used the 'copy content from English (US)' option on the page. The content was then modified for the UK and AU markets.

However, what we keep seeing now is that the content is reverting back to what is used on the English US language pages somehow.

It's worth noting that these pages weren't 'duplicated', but were just copied. And anywhere that a page was duplicated previously, I have clicked the edit independently button.

July 17, 2018 at 10:54 am #2529984

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi,

but the pages are saved or not? If they aren't saved at all, you could try to increase the MaxInputVars value (you need to ask your hosting for this).

If instead they are saved, I'd ask you to test in a minimal environment. Please do as follow:

- backup your site and database
- deactivate all your plugins except WPML
- switch to a default theme like TwentySeventeen
- check if the issue is still happening
- if not, reactivate your plugins one by one, trying to see which one causes the issue
- reactivate your theme at the end.

If the issue exists also in a minimal environment, I'd have to ask you for a copy of the site to further debug the issue.

July 18, 2018 at 6:51 am #2531765

michelleH-5

Hi Luara,

I'm not sure what you mean by if they are saved or not? The pages are published and available on our live site, someone came to me saying that the GB site was showing US content, which I corrected last week, but then this week it is showing the US content again.

However, I'm not entirely sure how to replicate the issue either, I just know that the US content keeps appearing on the GB and AU sites as though it isn't being duplicated across. So I wouldn't know where to begin with the minimal environment unless I just leave it for an indefinite amount of time and hope that it happens again. I'm more than certain that this is a WPML issue though, as I don't see what else could even be causing the pages to copy between languages, so far as I can tell, only WPML has the ability to do that.

Thanks,
Joe

July 18, 2018 at 8:18 am #2531896

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi,

sure it's a WPML issue, but there must be something that is blocking WPML from doing its job, because this isn't its normal behaviour.

So you are saying the issue is happening randomly, and not as soon as you edit your page? When things happen randomly, 90% of times is a server or a caching issue. I'd start clearing the cache in WP Engine Advanced Cache, and if it's possible to disable it to see if the problem pops up again.

July 18, 2018 at 8:45 am #2531939

michelleH-5

Yeah it doesn't appear to be happening to all pages, just the ones we've edited.

So for instance I made an update the the US version of the page the other day, but someone that has caused the US page to duplicate across to the GB and AU pages, despite them not being touched at all.

I will clear the cache now and see if that helps first and if not then I will look into disabling the advanced caching plugin.

Thanks,
Joe

July 18, 2018 at 10:24 am #2532119

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Ok, thanks, I will wait for updates.

July 25, 2018 at 6:45 am #2578328

michelleH-5

Hi Laura,

So, all was going well and it looked as though the issue was resolved but then I received notice that the Australian site was showing US content again, so I checked the GB site, and sure enough, US content as well.

I've had a look at the page revisions and it says that I made the changes to the pages 18 hours ago, which I obviously didn't. So, something is going on here.

Just for confirmation, I have already (per your previous post) cleared and removed the advanced caching plugin that was in use on the site.

Any help would be greatly appreciated.

[EDIT] I've attached a screenshot of the message I am getting on these pages. Not sure why I am seeing this message though as the pages were all manually created using WPML and didn't go through the translation dashboard.

Thanks,
Joe

July 25, 2018 at 2:29 pm #2580514

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi,

I logged into your site to see the situation. If I go to Translation Management and filter pages in English (US) to English (AU) I can see there are a couple of them that needs updating, like "Compare Models" or "ActivInspire". Are these the pages you get the notice for?

Also, notice that even you didn't use Translation Management to translate them, they can be found in its dashboard because you can found all your content there.

July 25, 2018 at 3:20 pm #2580734

michelleH-5

Hi Laura,

It always seems to be the homepage, ActivPanel & How To Buy pages which are effected along with a number of the other pages as well, looking in the translation dashboard though there a number of pages that need updating, but it doesn't seem to effect them all.

In terms of translating them, you are correct, I didn't use the translation dashboard. I instead manually created the pages by clicking the + symbol for the appropriate language on the US version of the page. Once the language version had been created, I copied the content from the English (US) site.

Its worth noting that I have gone into the site this morning and changed all of the content back to the correct content for that language as well, so what you're seeing might not be an accurate representation of the issue.

Joe

July 27, 2018 at 7:25 am #2587118

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi,

at this point I'd like to have a copy of your site to test on my local environment and then eventually escalate.
We usually suggest the Duplicator plugin to create a copy of the site. I'll enable a private reply so you can safely share the link to the package with me.

July 27, 2018 at 12:52 pm #2588308

michelleH-5

Hi Laura,

Okay yep, I can provide you with a link to download our entire site, our host provides an in-house backup solution that I can send the link over for.

Just an FYI, but it appears that this issue is also present on our other language sites which we are in the process of launching. The translations were all done via an external agency and WPML Translation Dashboard, yet somehow they have pulled blobs on the english site down to them that have been updated since we got the translations back.

Please let me know how to send you a private link for the site download.

Cheers,
Joe

July 27, 2018 at 1:19 pm #2588412

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi Joe,

the next reply will be private. So to you, it's like the translation made by the external service somehow interfere with the ones you created, am I right?

July 27, 2018 at 3:25 pm
July 27, 2018 at 3:34 pm #2588845

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi Joe,

I think I got the issue, however, an explanation video is more than welcome. If this is what happens, it shouldn't behave this way.

I'll download your copy of the site and I'll get to you after doing some test. Happy vacation!

August 3, 2018 at 9:22 am #2608543

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi Joe,

I hope you enjoyed your vacation. Your copy site is missing the database so I couldn't do any tests yet. I'll enable a private reply so you can share it with me.