Please make sure to update to WPML 4.3.4 before reporting any issue

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 11 replies, has 2 voices.

Last updated by melindaA 1 year, 1 month ago.

Assigned support staff: Yvette.

Author Posts
October 11, 2018 at 3:42 am #2806625

melindaA

I have many translated media images that are duplicates for some reason. They have the same URL but different tags. Some don't even show an image. I understand the translated media images all point to the same physical image so they're just "pointers". How do I delete the duplicates without deleting the original image so I just have one image for each translated image?

October 11, 2018 at 3:29 pm #2809005

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hello

Just to clarify the situation.

Do you mean that you have duplicate images for the same language version?

For example, if you have 2 languages installed on your site, the expected number of "image pointers" would be 2 (one for each language). Both pointing to the same physical file.

Do I understand that in your site, you have a quantity > 2 for each image?

If so, the I have a script that can remove duplicate image files within each language. In the case above, this would leave only 1 image per language version.

If this describes your situation, please take a backup of your database and then provide system access so that I can apply this clean up tool.

I wait for your confirmation and system access details.
Thanks

October 12, 2018 at 4:37 pm #2812632

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hello

1. Fixing DB
I´ll take a look at the current state - please confirm to me that you have mad a backup of the site + database so that I am comfortable to get to a restore point if the scripts do not work of if if does something unexpecdted

2. Sample posts
You wrote: "... have some translations pending that were created from clicking on the images in Translation Mgt. ..."

Please send example links.

3. Image not showing
You wrote."...There is one image in Spanish that doesn't display until you click on it. .."
Please include link.

I wait for your confirmation regarding the backup before doing anything.

October 12, 2018 at 6:31 pm #2812897

melindaA

1. I do have a backup. It's taken each night of the db and files so we should be good.

2. See attached two first pictures. Translation management (Capture1.png) allows me to select pictures but then it makes me review/translate the whole article again just to get the picture translated to Spanish. So effectively i have to translate each picture one by one. The second picture (Capture2.png) shows articles I batched to translate just to translate the pictures. These are the articles i will have to review one by one to get the pictures over. Is that what i have to go through. It seems inefficient to have to do this one by one. What if you had 100 pictures to translate?

3. The third picture shows the picture that is blank until you click on it. It's not a big deal but i'm just curious. There were many more duplicates and triplicates but i deleted them and it seemed to be ok.

4. Then check out the pictures in media translation. The original language is all over the place. I don't know how it got like that. I think they should all just be original owners for English. I guess Chinese should not have any for now until i get to them.

October 15, 2018 at 5:44 pm #2818469

melindaA

Hi. I just want to add clarification that i didn't even want to have 3 different copies of images. If i can make it more simple and just use the same image (or translation) for each image, that's fine with me. I only installed the image plugin because from what I read, seemed to imply you need to translate all your images.

October 16, 2018 at 12:08 pm #2820880

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

I´m sorry for the delay to attend this ticket. I am now working on it.

October 16, 2018 at 1:53 pm #2821167

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

1. OK

2. Translation Management
You do not have to go through the WPML -> Translation Management -> Translation Dashboard to translate image texts. This interface will indeed send the entire article to translation.

For this purpose, you have the WPML -> Media Translation panel.
This is the way you would change alt text/title/description/caption of an image in each langauge. You can also associate a different image file in other langauges as well.

3. Thumbnail generation
I´ve installed a plugin to regenerate your thumbnails and ran the tool in each language. Now the media library shows all the thumbnails.

4. Database
This is done. Please remember that the image will take on the active admin language as the source language when it is uploaded to the media library.

5. Media Duplication
While you don´t have to use the WPML Media Translation unless you want to translate captions/alt-text/descriptions/titlies...etc associated with an image. You ALWAYS have to duplicate the attachment post to all language spaces. This is done in the core WPML CMS plugin here: WPML -> Settings -> Media translation -> Start

If you do not do this, you will see placehoder images (grey boxes) or empty spaces where you are expecting to see images in 2nd lanaguages.

I hope these steps have resolved your issue.

October 16, 2018 at 4:10 pm #2821731

melindaA

Ok. Thanks. I think we're much closer now.
There were a few duplicates when i looked at Media as well as the Media Translations.

1. So in Capture1.PNG i removed the duplicates in all 3 languages but I still see them duplicated in Media Translations. How do i remove those?

2. There are also some duplicates like the top 2 in cpature 2.PNG which are displayed in Media Translations. How do I resolve those?

Thakns so much for your help

October 16, 2018 at 6:28 pm #2822104

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hi

I´ve fixed the instances where there were true duplicate images. However, the other (see images) are actually different images as they are pointing to different physical files.

You need only decide which one to eliminate. I would suggest you do this by using the image name in the search filter of the media library for each active language.

I hope with this, you can consider your issue resolved

October 16, 2018 at 11:09 pm #2822523

melindaA

Something really wrong happened. All the menus disappeared. The theme seemed to loose all it's settings. I had to restore to backup from last night.

I think we're back to where the images all have different primary languages. Is there a way to tell me how to make the changes or does it have to be done by script. I think the first change you made may have been ok. Maybe it was the second change? i'm not sure.

I hadn't done anything so i can't see somethign other than the changes you did.. but can't imagine how just changes to images would have done it.

October 17, 2018 at 6:30 am #2823231

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Sigh.

You are right - nothing with images would affect your theme menu settings.

I had manually picked through the icl_translations db table with ARI Adminer to change the language tags for images that did not have the EN language as the source language. Unless you are comfortable with maniupulating the database directly, I would not reccommend you try this.

Perhaps the easier way to get what you want is to do the following steps. It´s a bit longer but the end result should be the same and you do not have to touch the database directly.

1. execute the WPML -> Settings -> Media Transation -> Start
(this will create duplicates in all languages of your existing media). If there are still images missing in some languages at this stage, then change your WPML defaulat langauge temporarily and then execute the step again until all images have a checkmark in all languages.

2. With your normal admin language and using the Media Transaltion dashboard as a guide, go through your media library and delete any images in ZH or ES that appear in the dashboard as the **source** language. (When you delete the source image, it should make the EN version the new "source" image)

3.keep doing above until all images in Translation Media dashboard are showing EN as the source language for all images

4. Then repeat the media duplication (this will reinsert the media in other languages you had removed)
WPML-> Settings -> Media Translation -> Start

5. Once the Translation Media shows all images in EN, you can move on to thumnbnail regeneration
Do the regeneration in each admin language where there are blank boxes showing in the Media Library.

6. Finally, eliminate your "repeated" images.

Try this out and let me know how it goes. I would then encourage you to take a backup of your site once you have the media as you want so you can save your work and not have to repeat you hour of work.

October 17, 2018 at 8:37 pm #2825864

melindaA

My issue is resolved now. Thank you!