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

Last updated by Ilana Wilner 1 year, 7 months ago.

Assisted by: Bobby.

Author Posts
March 31, 2023 at 8:47 pm #13378779

Ilana Wilner

Hi,

Today I received the following email letting me know about a featured request update for something we requested was completed:

Hello,

This is an update to your recent feature request for deleting translated media when the original is deleted.

Please go to WPML->Settings->Posts and pages synchronization and enable "When deleting a post, delete translations as well"

This will allow you to delete the translated media at the same time as the default language media is removed.

Regards.

--
Bobby Karabinakis
WPML Support Team
OnTheGoSystems
http://www.onthegosystems.com
The makers of WPML, Toolset and ICanLocalize

-----------------------------------------------

However when I follow the steps outlined, images/pdfs/etc. that I upload are still not being removed from both language media libraries.

I am using WPML Multilingual CMS Version 4.6.3. I have attached a screenshot of all of my WPML settings, in case it helps to view.

Any idea why it isn't working as it should?

Thanks!
Ilana

Settings-‹-Activate-Learning-—-WordPress-2023-03-31.png
March 31, 2023 at 10:17 pm #13379289

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi Ilana,

If you have media that has been uploaded to the default language, you can go to Media Library select that media and click on "delete" then it will remove the translation as well.

Would you mind confirming that this is the workflow you are following?

Feel free to also test on the following sandbox -> I have uploaded a media for you to test deleting.

hidden link

April 1, 2023 at 2:40 am #13379939

Ilana Wilner

Hi Bobby,

Thanks for your help!

I have tried deleting the media on your sandbox to see if it would actually delete the media, and it is not working on your sandbox either. Here are the steps I followed:

I went to the Spanish Media Library page and clicked the link to "permanently delete" the file - Screen-Shot-2023-03-31-at-2.55.08-PM.png. This removed the item from the Spanish Media Library page, but the file is still available online. So, despite permanently deleting the file I can click on its link to view it, which means that the file wasn't deleted at all!

Here is that link to the file:
hidden link

Also if I go to the English Media Library the file is still there.

Just to back up a bit, the feature we were requesting was to remove the media file from all languages when it is deleted from any language.

Here is someone else explaining the same issue - https://wpml.org/forums/topic/delete-media-permanently-in-all-languages/

Currently we have our site set up to upload to all languages (to see the exact settings, see the screenshot from my previous message). As WPML makes the file available in all languages, but it is just a single file (ie. doesn't duplicate it, just duplicates the link) it would make sense that if you delete a file from the media library, the file would be deleted.

But this isn't what happens. It only deletes the link (not the file) from one language media library, it doesn't delete the file until you go and delete it from all of the languages on the site.

This is counter-intuitive and has confused a lot of clients. They think by clicking permanently delete they are actually deleting the file.... but they are not.

From your email earlier today it sounded like this issue has been resolved. Is there something I am missing and this is fixed? If not, can it be?

Thanks!
Ilana

April 1, 2023 at 2:47 am #13379953

Ilana Wilner

Ps. I believe there is an bug/conflict with WordPress version 6.2. You can no longer go to the media library and then click on 'All Languages' in the languages drop down menu. When you do it redirects back to the media language page you are on.

So for a moment the following link pops up in the URL bar, and then it reverts to the language you are on.
hidden link

You can see this in your sandbox.

April 3, 2023 at 7:02 pm #13393667

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi Ilana,

I see, thank you for the explanation.

That is correct, if you delete from the translation this will not delete the default language, this feature at the moment is meant to delete from default.

So you would have to delete from the default language and then all translations would be deleted as well.

On the sandbox that would be from English.

I have updated the feature request in our system and will update you here if there are any updates.

April 4, 2023 at 1:40 pm #13400567

Ilana Wilner

Thanks Bobby! Actually I hadn't realised that deleting from the default language would delete the link from both libraries... that is great! Thanks for all of your help!