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

Supporter timezone: America/Lima (GMT-05:00)

Tagged: 

This topic contains 25 replies, has 2 voices.

Last updated by Nicolas V. 1 year, 10 months ago.

Assisted by: Nicolas V..

Author Posts
April 26, 2023 at 3:27 pm #13542871

johnP-61

Hi Nico

Apologies for not responding sooner - nothing I've done so far on the dev site seems to be helping. I am currently having to focus on a couple of other projects, and need to dedicate some time to this when I can - I will be back in touch as soon as I can have a proper dig into this again. My apologies again

John

April 26, 2023 at 9:36 pm #13545079

Nicolas V.
Supporter

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

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

Hi John,

No problem, I will let that ticket "Waiting for user feedback". After 14 days the ticket will be automatically closed, so if you need more time just write back in the ticket and it will extended for another 14 days.

Nico

May 4, 2023 at 10:12 am #13584863

johnP-61

Hi Nico - hoping to get through all the suggestions today. I need to really get everything back to square one on the live site asap. I'm working on a dev site to try and figure it out first and will then have to retrace my steps after. Will be in touch soon

John

May 4, 2023 at 1:50 pm #13587059

johnP-61

I have been trying all day to sort out the media library which is a total mess of duplicates. I've even purchased the pro version of the plugin that you recommended, but nothing seems to work. I can't manually remove the 4000 duplicate entries. I'm totally at the end of my tether with this now and I don't even have WPML installed any more. I'm concerned that it will just duplicate everything again if I try adding it back on. I 100% need the media library back to how it was before the WPML install. Going to a back up is not an option as our site is constantly having new content added to it and we'd lose all that work.

Any further help would be really appreciated Nico - I've asked the Media Cleaner plugin author for help too

John

May 4, 2023 at 3:51 pm #13588427

Nicolas V.
Supporter

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

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

Hello,

Can I get access to that staging site? Also can I installer Adminer to get access to your database and check how those images are registered?

I have activated a private field for your next answer where you can provide that information safely (this field is only visible by you and the support team). Don't share your own admin account, create a new one that you will delete when we finish troubleshooting.

IMPORTANT: Before we proceed, please backup your site and database.

Nico

May 5, 2023 at 9:04 pm #13596991

Nicolas V.
Supporter

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

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

Hi John,

Just a quick message to let you know that I'm still working on your staging site. I'm trying to regenerate thumbnail because I found that in your library the same image could show up several times.

The plugin has been running for hours and is only at 60%. I will let it run to completion and have a look at the results tomorrow.

Thanks for your patience,
Nico

May 8, 2023 at 12:17 pm #13605325

Nicolas V.
Supporter

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

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

Hi John,

Here is a list of things that I tried over the weekend:
- I tried the WPML code provided earlier to clean up image translations
- I tried the Media cleaner plugin and deleted all unused images and empty the trash
- I tried the regenerate thumbnail plugin

After that I installed Adminer and accessed the database to manually check if those images where still in the icl_translations table.

I took as an example the image Neptune_Energy_Logo_reverse which appears 3 times in your media library.
I was able to find the IDs for each image in the database however the icl_translations table is completely empty!

I don't see an easy solution here because WPML tables are empty, those images are not registered as translations.

If you have a backup from before deleting those tables let me know.

Nico

screenshot-2023.05.08-07_13_58.png
May 11, 2023 at 12:18 pm #13630303

johnP-61

Thank you for trying to help out Nico - we may have a copy of the database, but the trouble is so much will have changed since we installed as the live site is constantly updated with content. It may be that we just have to live with those duplicate entries in the media library. What I want to make sure is that we can re-install WPML without it causing the duplication again. If we install and then do each page one at a time, using Divi rather than the built in translation tool, will that allow us to do that?

May 11, 2023 at 3:07 pm #13631351

Nicolas V.
Supporter

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

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

Hello,

I'm not sure to fully understand but let me give you as much details as possible so you can make your choice:

1. WPML will duplicate in the database images used in a page you translate unless you uncheck the two boxes about media attachment on the page (see capture1). However, if you uncheck those options, you won't have any image in the translation. Again, WPML duplicate the entry in your database to allow you to translate texts related to those images (caption, alt etc...).

2. When WPML is activated you won't see duplicates in your library because you will have a different library in each language. So the English image will be in the English library, the Australian image in the Australian library and so on...

3. I did a quick test and translated manually a page with an image and WPML will still have the image in the library of the secondary language. So going through Divi will be the same as going through our editor.

To sum up:
- WPML duplicate images entries in the database.
- Images are a post type (like posts or pages) and WPML will have those duplicates marked as translations of originals
- Each language will have its own library (no duplicates in one language)

I think what happens in the past with your site might be the following:
- When you deactivate WPML, all posts are under the main language (because there is only one language). Same thing happens with images, all under the same library. That's when you have duplicates. But at this stage it can be solved.
- If you don't clean up the media library at this moment using our code or if you don't use the WPML reset option to completely delete all translations then those duplicates will still be in the library.
- From there is you empty all icl_* tables in your database we won't have any record of which image is an original and which image is a translation and that's were the issues start.
Using our code or even reactivating WPML to get back different libraries won't work because WPML tables (icl_*) are empty.

I hope this makes sense and will allow you to avoid such issues in the future.

Nico

capture1.png
May 11, 2023 at 3:48 pm #13631605
johnP-61

Hi Nico

Thanks for coming back to me. Just to be clear I did run through the full WPML reset before uninstalling or getting in touch and yet the media library issue persisted.

However, I have moved on from worrying about that as it's clear there's going to be no way for me to get rid of those duplicated entries without effecting the live images on site (if I remove one of the duplicate entries, it actually deletes the corresponding file but leaves the other two entries in the library). I've explained this to the team that update the site.

I am now working out the steps we will need to take in order to manually translate pages one at a time, using the dev site as a staging area. However, my first issue is that on the dev site you'll now see that the menu is not the same across the different languages (I've only "translated" the homepage for now as a test) and in trying to synchronise the menu across in the back end "appearances > menus" area, it's somehow actually lost the menu on the main original language entirely, even though it's still present on the front end. The only menus now available to choose from are three duplicated US versions that only have two menu items (I have no idea why the US version only has these random entries!). I've provided some screenshots for you to look at for these menu issues.

I have also gone through the process of translating the Divi footer as per your previous instructions, but for some reason on the translated page its severely misaligned.

I feel like I'm missing something obvious! Any help appreciated

John

New threads created by Nicolas V. and linked to this one are listed below:

https://wpml.org/forums/topic/split-changing-images-on-divi-pages/

Screenshot 2023-05-11 at 16.38.12.png
Screenshot 2023-05-11 at 16.38.41.png
Screenshot 2023-05-11 at 16.38.52.png
Screenshot 2023-05-11 at 16.39.08.png
Screenshot 2023-05-11 at 16.40.50.png
May 12, 2023 at 1:48 pm #13637893

Nicolas V.
Supporter

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

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

Hello,

Since we limit one issue per ticket, I have opened a new ticket for your additional question. Let's continue our conversation on that new ticket: https://wpml.org/forums/topic/split-changing-images-on-divi-pages/

Keeping one issue by forum threat helps to keep the forum clean and organized, it will also help other users with similar problems to find solutions when searching the forum.

Thanks for your understanding,
Nico

The topic ‘[Closed] Changing images on divi pages’ is closed to new replies.