Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was experiencing issues with PDF files appearing in the wrong language search results on their multilingual website. They were using Ivory Search to limit search results by language and had uploaded PDFs for specific languages. However, PDFs uploaded for one language were appearing in search results for other languages. Additionally, they were unsure about the best practices for uploading media so that it only appears in the search results for the corresponding language.

Solution:
deactivate the media duplication option, which makes a media file available in all languages when a page is translated. This option can be found in the WPML settings and applies to all media types, including PDFs: https://wpml.org/documentation/getting-started-guide/media-translation/#using-different-images-and-media-across-languages.

We also explained that the search functionality is handled by the theme/plugin and should automatically filter content by language in almost all cases. Make sure that all pages containing the documents are correctly translated and that the PDFs are linked correctly according to the language.

Lastly upload media in the correct language section of the media library (by using the WordPress topbar language switcher) and checking the WPML > Settings > Media translation(plugin) to ensure that media files are not duplicated but translated.
If the solution provided is not relevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket in our forum: https://wpml.org/forums/forum/english-support/.

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

Last updated by Alejandro 9 months, 3 weeks ago.

Assisted by: Alejandro.

Author Posts
February 3, 2024 at 9:31 am #15261865

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Is there any way you can remove that option while we work on the tickets? Because the IPs change, sometimes quite fast and it's totally dependent on the internet company ones use so, if you take too much time to answer (even by just a day) the IPs can change and we'd be stuck on this process forever 🙁

I took both the tickets you have and want to work on them but my IP just changed and I'm not able to access anymore. I'd be working from Monday to Friday and I accessed today just to see if I could get to the site and as I suspected, I couldn't.

Regards,

February 13, 2024 at 3:06 am #15295345

mariannaF-4

We created a staging site that the firewall shouldn't effect it. I updated the login info in the private message.

hidden link

February 13, 2024 at 11:41 am #15297195

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Ok the problem here is not a bug or anything, it's just that at one point you had uploaded files when the media settings were set to make the files available in all languages.

as a result some files were, well, available in all languages and that means the same file, in the same language was added to all the languages.

Then you went to, say the german media library and added another file there, as a result you ended up with 2 files. This was not a BUG on our end, it was just a slight logistics oversight.

to understand the behaviour you'll get i'd suggest you do things by steps:
- Upload a file in one language and check if it's available in the other languages as well.
- if it's not, Add it to one place (A page, a post, wherever you add them normally in the buttons you showed me before) and translate that page/post, etc
- if the file appears now, it's because it was duplicated to make sure it existed in the other language as well.

If that's the case, you can use media translation to make sure that the files are not duplicated but instead TRANSLATED, so you go to WPML > Media Translation > translate the files. that way when you translate a page or anything with the media in there, then in the translation it would "map" it to use the translated version of that media.

You can see all i mean here and also how to fix it (Which is also explained above): hidden link

Regards.