[Waiting for user feedback] To translate media files and filenames
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.
Our wait time is higher than usual, please make sure you are meeting the minimum requirement - https://wpml.org/home/minimum-requirements before you report issues, and if you can take a look at current Known Issues - https://wpml.org/known-issues/. Thank you.
Background of the issue:
I am trying to translate media filenames using Phoenix Media Rename. After translating media and changing all filenames, and after running media translation index in WPML settings, original language images disappeared. The default language is Lithuanian, but the second language (English) is okay. Example pages: Default language: hidden link, Second language: hidden link.
Symptoms:
Original language images disappeared after translating media filenames and running media translation index.
Questions:
Why did the original language images disappear after translating media filenames?
How can I restore the missing images in the default language?
We might be facing a compatibility issue with the Phoenix Media Rename plugin. Although it is officially compatible with WPML, we have not tested it since May 2021.
We need to replicate this issue on a fresh WordPress installation. Then, I'll be able to escalate it to our compatibility team. For this, I created a test website with a clean WordPress install. You can access it through this link:
hidden link
With this link, you'll be directly logged in.
I installed the Phoenix Media Rename plugin and configured WPML to use Lithuanian as the default language and English as the second language.
Please let us know when everything is finished and you can replicate the problem.
Important! Do not import your site to the test site. We must replicate the problem on a fresh, clean WordPress installation.
Regards,
Itamar.
I'm sorry, but I don't know how long it will take to solve the problem. Our compatibility team will check it and respond in the next few days. We always do our best to fix anything we can. However, compatibility problems are not always in our hands. We might need the cooperation of the Phoenix Media Rename's developers. You can also contact them and report this problem to their support team. It may expedite the way to a solution.
Now, things should work, and the images will not disappear after renaming them.
We must explain that when you upload an image to WordPress's media library, WPML does not duplicate the file in other languages. Instead, it creates an entry in the DB to show this image file in another language. If you need files with different names, you can use our Media Translation add-on and upload another file with a different name for the English language. You can read more about the Media Translation add-on here.
after code changes it seem like it worked, but after bigger scale translations the problem still the same. We have missing a lot of images in the original language (not translated), but translated images are still there.
Our compatibility second-tier supporter als asks and explains the following.
Is it possible that the images were uploaded or modified using Phoenix while in the secondary language?
All changes should be made from the original language to its translations. The code implementation is designed to detect updates in the original and apply them to translations. So if modifications are made directly in a translation instead of the original, they won’t be reflected.
I see two possible scenarios here:
The image was uploaded in Lithuanian but then modified from English (most likely case).
The image was uploaded in English, but then modified from Lithuanian.
The issue now is if the client changed the filename in the secondary language, then I don't see an easy way to "reconnect the original". The client will have to revert back the changes in the secondary language to match the values still stored in the original language.