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 topic contains 13 replies, has 2 voices.

Last updated by T4ng 5 months, 2 weeks ago.

Assigned support staff: Jamal.

Author Posts
February 15, 2019 at 11:08 am #3204223

T4ng

I just noticed that, for a specific page I translated through the WPML Classic editor, the corresponding sitemap declarations include the native language images instead of the translated ones (added "the right way" through to the Media Translation tool).

How can I fix this?

Thanks

February 15, 2019 at 3:45 pm #3205757

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Thank you for contacting WPML Support. I will be glad to help with this.

Please make a full backup and update all WPML plugins to latest version.

Can you give the url of this specific page presenting the issue ?

Looking forward to your reply.

Best regards,
Jamal
WPML Support

February 15, 2019 at 4:03 pm #3205845

T4ng

Hello Jamal,

My WPML plugins are up to date.

To hide, please >> ~/page-sitemap.xml: 1705 - ~/en/tiwal2/

Thanks!

February 15, 2019 at 4:20 pm #3205903

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

I just checked this image for "tiwal2" page in /en/ and /fr/ and they seem to me are using different images. Here the list of used images for each page:
/fr/tiwal2/ :
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link

/en/tiwal2/:
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link

Notice, that except the logo all images are different for both languages. I think this is normal as you are duplicating medias across language(according to the debug information).

Maybe i did not understood your request very well, if it is the case, would you like to express your request like.
1. I have installed xxx
2. I have done xxx
3. I expect to have xxx
4. Instead i had xxx

Looking forward to your reply.

Best regards,
Jamal
WPML Support

February 15, 2019 at 4:39 pm #3205998

T4ng

You're right, these are the images used on the version of the page.
But when you open the sites's pages page-sitemap.xml file, and take a look at its source, you'll see that these english alternative images are not the ones declared under the english page's section, under:
<image:image>
<image:loc>

The french ones are still there.
That's surprising because it doesn't seem to be the case for the other translated pages of the website (ex: ~/tiwal3/montage/).

February 15, 2019 at 5:01 pm #3206127

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Thank you for your feedback, i checked the source code, and i confirm that the /en/tiwal2 is using the images from /fr/tiwal2.
As this is not the case for other pages, i suspect the /en/tiwal2 was created by duplicating the /fr/tiwal2! Can you confirm that ? If you can provide a test server, create a page, then add images to it, and save, regenerate sitemap. Then translate the page by duplication. Regenerate sitemap and check if it is the case.

I searched through the forum looking for similar cases in the last year and i could find nothing relevant. Maybe this is new. Let me know if you can do the test. I can provide a test server if needed.

Best regards,
Jamal
WPML Support

February 18, 2019 at 9:56 am #3210957

T4ng

Hi,

Just did the test you asked for.
On a test environment, I created a brand new page with Elementor, in english, with a title, a text, and an image.
Then I translated this page to French with the + sign to get to the classic translation editor (the options duplicate the uploaded medias and featured image were both ticked).
Afterwards, I translated the image, through media Translation, by adding a replacement image. The content displays properly on the page, with the expected french image.
Result: the sitemap entry for this French page shows the english image.

Then, I unticked the duplicate media/featured options, translated the image to german, and duplicated the page to German.
Same result: le page displays properly, but the sitemap entry still declares the english image.

Last test. I did all the same without Elementor, building a classic WordPress page.
I get the same problems about the sitemap (always the original image), plus the fact that the images shown on the page won't be translated. Indeed, the media section of the Classic editor offers to translate the image, but the content section will always offer the original image, and after translation, that original image will be the one shown on the frontend.

February 18, 2019 at 2:08 pm #3212643

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Thank you for your feedback, i reproduced this too on a clean install. The ticket is now escalated to our compatibility team, i will get back to you as soon as possible.

Best regards,
Jamal
WPML Support

February 19, 2019 at 4:43 pm #3218135

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Our compatibility team has found the cause of this error and are now working on a fix for it. This will involve update de WPML CMS too, it might take sometime before being released.
Our apologies for any inconvenience.

Best regards,
Jamal
WPML Support

February 19, 2019 at 5:27 pm #3218320

T4ng

OK Jamal, thanks for your support, now looking forward to that fix.

March 14, 2019 at 4:14 pm #3346831

T4ng

Hi, any progress on this?

You said you could reproduce , but does this include the second issue? I mostly use Elementor, so didn't notice that before, but not being able to translate images through standard WordPress editor seems pretty concerning, right?

March 14, 2019 at 4:48 pm #3347243

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

My apologies for the late reply. I did not give you a feedback as the fix for the issue was not published yet.

The issue from what i could gather so far, is that when we upload the media, WordPress is adding a css class with the attachement id to the html. But when we update translation with the translated media, we don't actually touch the css class that was added. This class seems to be sniffed by the sitemap plugin and gives the undesired result.

The fix will land in WPML in next releases, as of now i still cannot tell anything more about the timing. My apologies for the inconvenience.

Best regards,
Jamal
WPML Support

May 2, 2019 at 10:54 am #3723915

T4ng

This issue seems to be fixed on my side. Did you guys correct it?

May 15, 2019 at 8:24 am #3813555

T4ng

Seems fixed, but no confirmation...