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 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 28 replies, has 2 voices.

Last updated by Long Nguyen 10 months ago.

Assisted by: Long Nguyen.

Author Posts
April 24, 2024 at 2:36 am #15558537

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

After restoring your site on my localhost and I don't see that issue anymore. It could be the button "Set language information" solved the issue on your site. I'm asking our 2nd tier support about this issue and update you here when I have something to share.

Thanks.

April 24, 2024 at 7:39 am #15559050

peterJ-48

Hi Long,

Okay, I'm waiting 2nd tier support reply.

Just for your information, We sent the DB without this problem "Getting duplicate images in media library after saving settings from WPML" so you will debugging on it, that's why you don't get duplicate images in media library in the local. But if you save the "Post Type Translation" setting from WPML, you will get duplicate images in the media library.

Currently, We are approximately 6,000 duplicate entries in media on our site and it is not possible for us to remove duplicate images in media. and this is not a permanent solution because as I said we already did it with "set language information" 6 months ago and now we are getting the same problem.

April 24, 2024 at 10:29 am #15560129

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Our 2nd tier support is checking the issue. I will update you here once I have any information.

Thanks for your patience.

April 25, 2024 at 7:21 am #15563639

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I got some feedback from our 2nd tier support: we can see various problems in the database.

To better understand, can you please give a clear workflow for how the products and images are added to the site, and how they are translated?

English is the default language. Does content get added in English and then is translated, or is it added in other languages and translated, including to English?

Thanks.

April 25, 2024 at 1:34 pm #15565926

peterJ-48

Hi Long

Peter here.

All products are setup in English and images are added when the products are set up.

Please see our YouTube tutorial for setting up simple products and variable products:
hidden link
hidden link

After the images has been uploaded, we add title, alternative text and description to the images. This is also always done in English.
All products are translated automatically. This is typically done by first translating the products into 2 languages that we know (in my case Danish and German). This is to check that the English text is written in a way that is understood correct by Deepl. When this is verified and it is correct, then the product is translated into the remaining 17 languages.

When translating variable products, we often experience that we can only translate 3-4 languages at a time. If we translate more than that, it often happens that variations are missing or that the description tap on the product page is missing for some languages.

In general, variable products are a bit of a pain, as we are also having performance problems when loading both variable products and category pages with variable products. However, this is a different topic that is reported on a different ticket: https://wpml.org/forums/topic/performance-issue-21/page/4/

So, in short everything is translated from English and everything is translated automatically. Sometimes it happens that translations are manually edited in the translation editor afterwards, but for 95% of the product we chose to rephrase the English text, so it is translated correct by Deepl.

April 26, 2024 at 1:51 am #15567536

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

I shared your feedback with our 2nd tier support. I will keep you updated.

Thanks.

May 7, 2024 at 6:14 am #15599897

peterJ-48

Hi Long,

Any update?
I'm waiting your reply.

May 7, 2024 at 7:10 am #15600086

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Our 2nd tier support is still investigating the issue. I will let you know as soon as I have any information.

Thanks.

May 15, 2024 at 3:36 am #15627506

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I got feedback from our 2nd tier support. We've not replicated the issue with clear steps but have a suggestion that possibly fix the issue in the future.

The author with ID 89 uploaded an image all duplicate images were created i.e. 20 images.
But 6 of them have the wrong language. So those are not counted. Thus only 14 images were correct.
Let's suppose those 6 images were not there in the icl_translation table at that time.

Now author with ID 1 may have updated the product so new attachments with the correct language are created making it 20 correct images.

Those 6 images still exist in wp_posts table, now user saved the settings that trigger the set language information, and all of them now have default language i.e. EN, and making it 26 attachments.

Replication of issue:

We tried to replicate this issue with the same product and a new product but with no success, each time the images were duplicated and correct.

Possible reason:

Since we can't replicate the issue with normal procedure there is one possible way we have replicated the issue.

- Upload the image and translate the product, all images are translated.
- Delete one record from the icl_translations table e.g. FR image, now FR image is missing, but one entry exists in the posts table.
- Save the product, WPML will create a new entry for the FR image in the posts table and one in the icl_translations table.
- Save the WPML settings, WPML sees that one attachment is missing the entry in the icl_translations table. It will create a new record with the default language with a new TRID. We have the same situation as in your site database.

Why icl_transaltions table missing records?

We're not sure why but there are possible reasons.

1. When WPML was duplicating the image, the server got the issue and the process halted midway. WPML was able to create a post entry but the request was terminated when adding the entry icl_translations table.
2. During the database migration, some records are deleted from the icl_transaltions table causing this issue.

Possible fix:

1. For the first situation turn on the "When uploading media to the Media library, make it available in all languages" in WPML > Settings > Media Translation so WPML can keep translating the image in the background even when the server terminates the request.
2. For the second one, we can't do anything. You need to prevent data loss during backup and restore.

Thanks.

May 23, 2024 at 2:39 pm #15663835

peterJ-48

Hello,

Please don't close this ticket until this issue is resolved.

May 24, 2024 at 1:56 am #15665412

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Let me know if the suggestions help you solve the issue on your site. You can post your feedback to the ticket in the next two weeks before it is closed.

Thanks.

May 29, 2024 at 1:15 pm #15684020

peterJ-48

Hi Long,

We follow the below steps,

First, We restored DB without duplicate images issue.

Second, We enable this setting "When uploading media to the Media library, make it available in all languages" in WPML > Settings > Media Translation.

Third, We save the "Post Type Translation" setting from WPML, then we checked on the media library still we are getting duplicate images in the media library.

Without duplicate media count total : 16,095 (See the screenshot : hidden link)
With duplicate media count total : 22,048 (See the screenshot : hidden link)

Please send send this video to 2nd tier support team : hidden link

The following issues need to be fixed::
------------------------------------------
1) Getting duplicate images in media library after save the "Post Type Translation" setting from WPML
2) After fix the point #1 issue then how to remove duplicate images from the media library, we need to remove around 6,000 duplicate entries in the media that are not feasible to us.

For you information, We verified we haven't data loss from backup and restore.

Let me know if you need anything from my end.

June 5, 2024 at 9:09 am #15705895

peterJ-48

Hi Long,

Currently, these settings are enabled for media translation.
See the screenshot :hidden link

Should i enable the setting "When uploading media to the Media library, make it available in all languages" in WPML > Settings > Media Translation?

Because, I'm not sure how it work if enable this setting "When uploading media to the Media library, make it available in all languages" in WPML > Settings > Media Translation.

June 5, 2024 at 9:48 am #15706010

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Yes, as our 2nd tier support suggested https://wpml.org/forums/topic/getting-duplicate-images-in-media-library-after-saving-settings-from-wpml/page/2/#post-15627506
you should enable the option "When uploading media to the Media library, make it available in all languages" so WPML can keep translating the image in the background even when translating the post and the server terminates the request.

Thanks.

The topic ‘[Closed] Getting duplicate images in media library after saving settings from WPML’ is closed to new replies.