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

Last updated by gabyR 1 year, 7 months ago.

Assisted by: Ahmed Mohammed.

Author Posts
May 16, 2023 at 6:14 pm #13659041

gabyR

I have in summary 12 PDF files at above WP site. 11 of them are showing up correctly in media library, but one not: hidden link. The one not in media library is referenced correctly at the english version of the site's start page (hidden link) and I can see it also in the database. When I deactivate WPML I can see all PDFs correctly.

I tried to install Media Translation, because I thought if I could use WPML Translation Editor instead of WordPress editor for the start page (which has links to different PDF files in German and in English), this might solve the issue. But it did not. Moreover I could not "translate" the path to the PDF file in the english version, because it was not offered by the translation editor.

Can you help?
Thanks in advance
Gaby

16-05-2023_19-51-01.png
May 17, 2023 at 1:50 pm #13664987

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Gaby,

Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with the first debugging steps or if I can help with the issue quickly.

I understand that PDF file appears in the Media Library when WPML is deactivated. This issue could happen if the media file does not have language information. To fix that, please try going to WPML → Support → troubleshooting and click "Set Language information". You can follow this quick GIF for help: hidden link.

Regarding using different media files per language, please follow this doc: https://wpml.org/documentation/getting-started-guide/media-translation/#using-different-images-and-media-across-languages.

Hope that helps 🙂

May 18, 2023 at 7:53 am #13669603

gabyR

Why am I not getting an answer?

"Set language information" did not help. I still see only 11 of 12 PDF files in the media library.

May 18, 2023 at 9:30 am #13670459

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Gaby,

Why am I not getting an answer?

My apologies for the delayed responses. Our support team is currently experiencing a high volume of requests.

Thank you for attempting the troubleshooting option.

I notice that you have access to the database and the ability to retrieve information. Would you kindly navigate to the "icl_translations" table and locate the "element_id" "18840"? It would be greatly appreciated if you could provide a screenshot of your findings.

Looking forward to hearing back from you.

May 18, 2023 at 11:49 am #13671527

gabyR

Thank you. I checked the entries of all PDF files in this table and found out, that the element with id 18840, which is the one, I can't see in the media library, is the only one with language_code "en" - see scrennshot.

I don't know how this happened. And unfortunately, I can't change it in the database (duplicate entry '35264-de' for key trid_lang).

I have many more issues of this kind. I took the whole website over from another agency. All documents and media should be german by default and are translated to english. But there are many elements which are "english" by default, which causes a lot of troubles.

18-05-2023_13-29-43.png
May 18, 2023 at 12:45 pm #13671901

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Gaby,

Thank you for checking this out.

That explains why the media file does not appear in the Media Library. It should show if you switch the language using the admin bar language switcher (screenshot: hidden link). This happens when you upload the media (or create a post/page) in the secondary languages. And most probably, that is what happened with that media file.

I understand that you tried to change the language code directly in the database and received an error (duplicate entry '35264-de' for key trid_lang).

I would recommend re-uploading that file in the original language, which is German, and it will take the appropriate language information.

Hope that helps 🙂

May 19, 2023 at 2:36 pm #13680223

gabyR

Hi Ahmed,

in fact the first issue is resolved now. Thanks to your help, I could find out that the duplicate entry of '35264-de' referred to an ID which did not exist in wp_posts. So I could delete it and change the other one to english and now I can see all documents in the media library.

The second problem is still open - let me know if I should open another ticket for that.

As mentioned above I have a page which should link to this PDF file, but only the english version of the page. The german version should link to the german PDF. I can manage this with WordPress Editor but not with WPML Translation Editor. It does not offer me the path of the PDF for translation.

I tried to do this as described in the link above (https://wpml.org/documentation/getting-started-guide/media-translation/#using-different-images-and-media-across-languages), but when I go to Translation Management and click on the page (I created a temporary one for testing: hidden link), no media is shown below. Is there any possibility to solve that?

In fact there seems to be something wrong in general: also the other pages do not show (all) images there and no videos, no PDF docs - see screenshot.

Thanks again
Gaby

May 19, 2023 at 2:37 pm #13680227

gabyR

screenshot

19-05-2023_16-22-26.png
May 19, 2023 at 4:22 pm #13680765

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Gaby,

Super glad to hear the first issue is resolved now.

Regarding the temp page, it looks like to be password protected in English.

Could you please check that out and may I kindly ask you to open a new ticket for this issue?

This will help other users with similar problems to find solutions when searching the forum.

Thank you!