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.

This topic contains 4 replies, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 11 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
May 30, 2022 at 1:09 pm #11344147

Nicolas

I have this issue in all may projects where I use wpml and classic translation editor:

All featured images, even if they are long deleted from the post still appear in wpml translation editor. How can I get rid of them and only see the published and up to date images?

See example.

Thank you for your help.

Best regards

CleanShot 2022-05-30 at 15.04.03@2x.jpg
May 31, 2022 at 10:46 am #11352173

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

I discussed the issue with the team. They offered following workaround, which I tried on my test site and seems to work fine:

IMPORTANT: Please take full backup of your website and database beforehand. It is highly advised to try the following on a staging/dev site first, so your live website isn't compromised.

- Go to Media Library.
- Detach all such images which are not in use anymore. Detaching is an important step!
- Delete all these images. Make sure to delete them permanently and in all languages.
- Edit the post(s) where these were appearing (i.e. as you showed in your screenshot).
- Make a small change so you can update the translation. And save the post.
- Go to edit the translation of the post and there shouldn't be these strings/images anymore.
- Complete the translation and save.

I am not sure if this'll work for updating posts in bulk, but you can try the following if you want to:

- After you are done with detaching and deleting the images in all languages.
- Try re-sending the posts for translations in bulk from Translation Management.
- It will change the job ID but I am not sure if images will be updated.

To easily manage this in future, you may also want to avail this option in WPML > Settings > "Posts and pages synchronization" -> "When deleting a post, delete translations as well". This will delete the media and its translations. See the attached image. This option is effective for posts, pages and CPTs (custom posts types).

Please let me know if this helps resolve the issue. Or I'll try my best to further assist you on the matter.

Regards.

when deleting a post.jpg
June 1, 2022 at 8:49 am #11360191

Nicolas

Hi Wagas

Thank you for your answer. Unfortunately deleting the images from the media library is not an option, as often images are used in other posts as well.

I have also experienced the situation that images are listed in wpml translation editor even if they never have been assigned to the post, for example the wpml translation editor it populated with images which are used in Elementor footer.

Is there a way to turn off image translation in wpml classic translation editor at all?

Best regards

June 1, 2022 at 12:07 pm #11361993

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

I am afraid there's no such way to just disable media translations in classic translation editor. You can either deactivate the Media Translation plugin or can set Media (attachments) as "Not translatable" in WPML -> Settings -> Post Types Translation. But of course this will entirely disable media translation.

On the other hand you can play a bit with Media Translation Settings to best suit your needs, see https://wpml.org/documentation/getting-started-guide/media-translation/#id5.

However, may I ask for admin access to your website to check the issue in detail. Because this is bit weird that images from the footer are showing for translation on a post.

You can create a separate admin user for this purpose, which can be deleted afterwards.

Please remember to take full backup of your website and database before proceeding. However, a staging/test site is highly recommended, because I may need to try some changes/fixes on the site, which may cause conflicts with the live site otherwise.

I've set your next reply as private to share this information safely.

IMPORTANT: If you don't see the section for providing access information, please do not write in the message box or the information may appear as public.

Please see https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

Regards.

June 2, 2022 at 9:17 am #11370985

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for providing the information.

Before doing any change in the setup on your provided site, I tried to reproduce the issue but couldn't reproduce it and can see things working correctly. I found no extra image or string in the translation editor. Please see following posts:

1. Two posts in Posts -> ....by WPML Support
2. Two posts in Winzerbetrieb -> ....by WPML Support

For the last post in #2 (Test 4...) I even tried to copy most of the content from the post you mentioned in your previous message. Also added a featured image and an ACF image. But these appear to work perfectly fine in the translation editor. In the translation editor I only see the image set as featured image.

However, one thing I did was the editing of the section showing slider images, using Elementor (see attached screenshot). I just made it invisible, saved, checked on frontend, edited again, made it visible and saved. I did this to check if making this show/hide makes any difference. But not sure it really did, however as a suspect it may have refreshed the translations queue. Because sometimes, if a translation is stuck or not working fine, removing/cancelling the job then editing the original post, helps fix such issues stuck in the system.

Anyways, can you please try with a new post and see if the issue occurs for you?

On the other hand, I examined a few of your existing posts in Winzerbetrieb and noticed that the additional images you see are actually used on the post. For example, the following posts have only additional images listed under "Media" section on translation editor, which are mostly used on these posts:

- hidden link.../winzerbetriebe/silou-wines/
- hidden link.../winzerbetriebe/graber-weine-messen-gmbh/
- hidden link.../winzerbetriebe/pfisterweine/

- hidden link.../praemierte-weine-betriebe/

While this hidden link.../wandern/ has a lot of images like the one you mentioned earlier, although there are only a few used on the page (or are relevant to page content).

So what I believe is that in the past, during the edits, there may have been different images used on these posts/pages. So these were attachments and were translated. Previous versions of WPML had this issue which produced left-overs in the system. And these additional images are still shown in some of the posts/pages as part of the translation (from those leftovers).

I'll refer to my first message again (https://wpml.org/forums/topic/old-unused-images-are-still-listed-in-wpml-translation-editor/#post-11352173). Since deleting these attachments is not an option for you, I can suggest following work arounds:

- Avail this option in WPML > Settings > "Posts and pages synchronization" -> "When deleting a post, delete translations as well" as mentioned in my first message (see the screenshot in that message).
- Delete the problematic posts completely (including from the trash).
- Recreate these posts.
- Translate again.
- Try these on staging site first to ensure the working!

Please let me know if this helps resolve the issue. Or I'll try my best to further assist you on the matter.

Regards.

gallery elementor.jpg
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.