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.

Our next available supporter will start replying to tickets in about 4.61 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 29 replies, has 3 voices.

Last updated by arnoP-3 1 year, 4 months ago.

Assisted by: Mihai Apetrei.

Author Posts
November 19, 2022 at 7:26 pm #12496645

arnoP-3

Hi,

I am using the File block on an English page. It's the standard block shipped with WordPress.

The Adv Translation Editor allows to translate the button name, and the visible file name. But the actual link to the file can't be translated. So I can't point to the German PDF file, for example. The link still points to the English PDF.

How do I make this work?

Thanks,
Arno

November 20, 2022 at 7:29 pm #12499823

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there.

1. Can you please let me know which is the page that you are referring to? How can I find it in the backend of the site?

2. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of the site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box.

The private box looks like this: hidden link

I will be waiting for your response.

Kind regards,
Mihai Apetrei

November 21, 2022 at 6:26 am #12501423

arnoP-3

Hi Mihai,

Access is not needed for this. It's really simple: drag a standard File block onto a standard page (not post, although that will likely have the same issue). Then translate the page, and you'll note that you can't change the file that will be offered for download.

Please let me know once reproduced.

Thanks,
Arno

November 23, 2022 at 7:36 am #12516745

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi Arno and thank you for the update.

Then, I will test this in a clean testing environment and I will get back to you with an update.

I'm leaving the ticket assigned to myself.

Mihai

November 28, 2022 at 10:08 pm #12550365

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there, Arno, and thank you for your amazing patience.

I wanted to let you know that I was able to reproduce the issue on a clean testing environment and I already reported this further to our developers.

I will get back to you as soon as I have news.

Until then, I'm leaving the ticket assigned to myself.

Mihai

November 30, 2022 at 7:59 am #12560129

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there, Arno. I'm back.

Our Tier 2 supporters let me know that the workflow to translate the Gutenberg File from the File Block is a bit different than what I thought it would be.

To translate the PDF file, you would need to go to WPML > Media Translation and replace the PDF file with translated one.

Using media translation, you just need to translate the file once and it will be replaced in all posts.

Related documentation:
https://wpml.org/documentation/getting-started-guide/media-translation/#using-different-images-and-media-across-languages

Mihai

November 30, 2022 at 9:08 am #12560769

arnoP-3

Hi Mihai,

Thanks. Does this work on your end? Did you try? I'm running into major problems:

1. I can "translate" the PDF via Media Translation: select a new file and give it a new name. Then I added the File block to the English page and updated the German translation. The German page still points to the English file!

2. I also tried what happens if I delete the PDF from the media library, and from the trash as well. I checked the /uploads folder: the English file gets deleted. The German file leaves a lot of copies behind:
file-150x150.pdf
file-181x256.jpg
file-271x384.jpg
file-724x1024.jpg
file.jpg

It only deleted the German PDF I uploaded, but it leaves all the German thumbnails while it deletes the English thumbnails correctly. Why does that happen? I have the setting "When deleting a post, delete translations as well" enabled.

Note that the file is gone from the media library and WPML Media Translation. But on disk it does not fully delete everything.

Kind regards,
Arno

November 30, 2022 at 9:35 am #12561211

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there, Arno.

Yes, I tested this together with my colleagues locally before sharing it with you.

1. Go to WPML > Media Translation > click the "edit pencil icon" for the pdf that you want to translate > select the other PDF file that you want to be used for the translation and upload > after you do that you should see a notification as in my screenshot below > click "scan and replace" button

2. For this, there is no trash. If the site is trashing them, it means that there is a plugin or a server setting that is doing that. Usually, these plugins change the post type status and then, after removing from the trash, WPML can not control them. So you would need to try that without any plugin or server setting active.

Screenshot 2022-11-30 at 11.33.15.png
November 30, 2022 at 10:51 am #12561993

arnoP-3

Hi Mihai,

1. The only thing I did different last time, is that I did not scan (the file was not used anywhere at that point). This time I did scan. There is no difference. The German page points to the English file.

2. ShortPixel is set to not optimize PDF files. For this test I even deactivated ShortPixel. The caching/optimization plugin was deactivated too. No changes: it still leaves behind thumbnails for the German file. Why would there be no trash if I delete the PDF from the WordPress media library? Do you mean that when I remove the English version from trash, the German version should automatically be gone too?

Anyway, the problems remain. Did you test with a PDF, not with an image? And did you check the /uploads directory on your server?

Would it help if you had a login to a copy of my site?

Thanks,
Arno

November 30, 2022 at 11:02 am #12562075

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there, Arno.

Yes, we tested with two pdf files.

It would help a lot to have access to a copy of your site.

I’m activating the private fields below.

Mihai

December 2, 2022 at 2:54 pm #12579283

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Thank you.

To further debug the problem I’d like to replicate your site locally.

I will need your written approval to be able to duplicate your site using a plugin called "Duplicator" and test your site on a testing environment so can you please let me know if this is ok with you?

After we find a solution for this, the duplicated site will be deleted.

Also, please create a full website backup before answering.

Kind regards,
Mihai

December 2, 2022 at 5:14 pm #12580027

arnoP-3

That's no problem Mihai, feel free to go ahead. It's a test copy of the site that is backed up daily.

Perhaps you should create a user for yourself before you take the backup. I'm not sure if the one click login will work locally.

Have a good weekend,
Arno

December 5, 2022 at 9:54 am #12589687

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi Arno, I'm back.

After some digging, my colleagues found there is indeed an issue on this website (we could not reproduce it in a clean install as I said before but it definitely happens on your site).

They found out that things work as expected only when they enable the PDF embed mode (attaching screenshot).

It is working here now for example:
hidden link

They will continue the investigation but I wanted to let you know about this.

Mihai

image.png
December 5, 2022 at 12:08 pm #12591015

arnoP-3

Hi Mihai,

Thank you for the update. It's a strange problem. Hopefully they can fix this soon. Please keep me posted.

Arno

December 6, 2022 at 10:53 pm #12602581

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there, Arno.

I will let you know as soon as I have any updates from my colleagues.

Until then, this ticket remains assigned to me.

Mihai