Skip Navigation

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

Problem:
The client is experiencing issues with Offload Media, specifically duplicated entries in the database, and is unsure about the functionality of certain WPML Media Translation settings. They observed that when translating posts through the editor with specific settings untoggled, the featured images are not copied, although content images are.
Solution:
We explained that the behavior of media in WPML is as expected. If the 'Duplicate existing media for translated content', 'Duplicate the featured images for translated content', 'Duplicate media attachments for translations', and 'Duplicate featured images for translations' settings are not enabled, the system does not duplicate or translate these elements. Specifically, for featured images to be translated or duplicated, the relevant checkbox must be checked. Then, the images should be managed via Translation Management to ensure they are correctly assigned per language. When translating a post that includes an image within its content and the media functionality is disabled, the original image from the default language is displayed unless adjusted by other settings or filters, such as those used by some page builders.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we highly recommend checking the related 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 7 replies, has 2 voices.

Last updated by Lauren 1 month, 2 weeks ago.

Assisted by: Lauren.

Author Posts
September 25, 2024 at 4:05 pm #16221835

T4ng

Background of the issue:
I am trying to fix issues with Offload Media (duplicated entries in the database) on a site under development. They suggest untoggling certain settings in WPML Media Translation.

I can't find any documentation explaining what these settings actually do.

I have observed that with the "future conent" options untoggled :
- when I upload two images, translate them,
- use them in the content and as featured images of a post,
- then duplicate the post,
I get both images (content and featured).

However, when I translate the post through the editor, I get the content image but not the featured one.

I believe this is similar to an issue discussed in this forum post:
https://wpml.org/forums/topic/featured-images-are-not-copied-when-translated/.

I have also provided a video for reference (I skipped some unecessary parts, but there are other no actions in between):
hidden link.

Symptoms:
featured images not being copied when translating posts through the editor.

Questions:
What do the settings
'Duplicate existing media for translated content',
'Duplicate the featured images for translated content',
'Duplicate media attachments for translations',
'Duplicate featured images for translations' actually do?

Why the featured images aren't copied when translating posts through the editor with the future options untoggled, while the content images are?

September 26, 2024 at 8:46 pm #16227526

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

After running some additional tests, here is what I found.

1. When you insert an image file into a page content, it copies over to the translation and the image meta shows in the advanced translation editor.

2. If you have a translation for an image in WPML -> Translation Media and you check the boxes to duplicate media (featured and uploaded), the media translations will show in the translated page.

3. If you don't have the featured image check box selected on the page edit screen, the featured image will not copy and it will not show a translation if there is one in media translation. To get it to show, you should check the box to duplicate featured image in the page edit screen in the original language.

So the best steps to take would be the following:
1. Add your media file translations in WPML -> Media Translation
2. Check the boxes in the page edit screen to duplicate uploaded media and featured image media
3. Update or create the translation.

Feel free to use the link for my staging site and test other options if you like. This link will log you in: hidden link

September 30, 2024 at 11:41 pm #16237843

T4ng

Hi,

I did a couple of tests again, on your platform.

Here are my findings;
I checked: uploading an image from the Media Library then create a post and add it, against uploading a content image from a newly created post won't change anything to its translation behavior. In both case, it'll be added to the ATE when translating as an admin.

If the setting > "Translate media library texts with posts" is ticked, then all the available texts will be sent to the ATE during the post translation.
Disregarding where it was loaded.
If that setting wasn't ticked: only the alt is sent to ATE.

This is worth mentioning in your documentation, since I would have thought the "alt" was included in the "Media library texts".

Now, again, I'm really questionning the logic, from a user point of view.

I mean... I understand you guys make a difference between the medias IN the content, and the featured image. I don't know why, but I trust you have a good reason for that). So that you offer separate settings for those:
- Duplicate uploaded media to translations
- Duplicate featured image to translations

Without further explanation -afaik, there's not documentation explaining all these curious behaviors- I assume the "uploaded media to translations" refers to the media used in the post content, and that it excludes the "featured image", for which the translation behaviour is set by the other option "Duplicate featured image to translation".

Now, NOT ticking "Duplicate uploaded media to translations":
- When a translation image was already uploaded to the Media Translation, it will be displayed in the translated page content, but won't retrieve the already translated texts
- When no translation image was already added, it will just deliver the same content as the original media (same file, same image texts).

While NOT ticking Duplicate featured image to translations"...
- WON'T set any featured image in the translations, disregarding what's been added from the Media Translation. Never. The only thing to get a translated feature image, is to add it manually from the edition page (not the ATE)

You explained how it actually behaves, and I'm grateful you spent time on this.

However, while the settings are clearly split between featured image and content media settings, their behavior is just not consistent against each other.

That's... tricky!

October 4, 2024 at 2:07 am #16252256

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

It sounds like our findings are the same. I can submit a request for the behaviors to be more consistent, or request clarification on why they are acting different. In the meantime, knowing the actions should allow you to move forward with the correct means of translation.

Please let me know if you need any further assistance and I will be happy to help.

October 4, 2024 at 1:06 pm #16254292

T4ng

Hi Lauren,

OK for these requests.

By the time we get some feedback, shall we keep this topic open?

More explanations regarding these settings in the dedicated documentation could also help other users:
https://wpml.org/documentation/getting-started-guide/media-translation/

Thanks for your support.

Best Regards,

October 10, 2024 at 4:43 pm #16276514

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

I have reported these inconsistencies that we found and will let you know here when I get more information about how or why it is handled this way.

October 10, 2024 at 5:04 pm #16276529

T4ng

Great, thank you 🙂

October 16, 2024 at 5:38 pm #16297259

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

I discussed the different behaviors of media with our developers and it is working as expected, and here is some further explanation:

If you try to translate a featured image, if the checkbox is not set - what to set there? Nothing. In other words, there is nothing to "translate", so the box must be checked and then translated via Translation management if you want different images per language.

When an image is added to a post, it is inside of the post contents. When you translate such a post, and you don't have the media functionality enabled - then the value is copied 1:1 which in turn will display the original language image - provided that other filterings are not applied (which happens for some page builders). When the check is checked, the value is copied 1:1 and adjusted to match the proper attachment ID and the translated image is being displayed.

I hope this clarifies how everything works.