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
- 8:00 – 10:00 8:00 – 10:00 8:00 – 13:00 8:00 – 13:00 9:00 – 13:00 -
- 11:00 – 17:00 11:00 – 17:00 14:00 – 17:00 13:00 – 17:00 13:00 – 18:00 -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by T4ng 19 hours, 45 minutes 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-04: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!