Skip to content Skip to sidebar

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

Problem:
The client was experiencing a 404 error on the Italian version of their website when the WPML String Translation plugin was active. The issue was traced to the WooCommerce endpoint 'wc/file/transient' being incorrectly translated to 'wc/file/transiente' in Italian, causing a PHP warning.
Solution:
We corrected the translation of the WooCommerce endpoint in the WPML String Translation to match the English version. This resolved the 404 error. We recommend the client to verify the changes by testing the Italian version of their site.

If this solution does not resolve your issue, or if it seems outdated, please check the related known issues and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket here.

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

Last updated by Mateus Getulio 1 year ago.

Assisted by: Mateus Getulio.

Author Posts
July 8, 2024 at 4:05 pm #15914509

bashirA-3

Background of the issue:
I am trying to use the WPML String Translation plugin on my site hidden link. I have set up multiple languages including Italian, English, and German. I have already tried switching to the default theme and disabling all plugins except WPML.

Symptoms:
When I activate the WPML String Translation plugin, the Italian language version shows an error 404. The basic English and additional German versions work fine, but the Italian version does not.

Questions:
Can you help with the error 404 issue on the Italian version when WPML String Translation is active?
hidden link
hidden link

July 8, 2024 at 4:39 pm #15914677

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

I debugged this but so far I couldn't find a fix.

I'd like to ask permission to make a copy/staging version of your site where I can debug this closely without affecting the live site.

I'll make sure to delete this copy as soon as we get this issue fixed.

I'm afraid of debugging directly on the live site and cause issues to your visitors. Also, it is important to test a different setup as part of the troubleshooting.

Thank you, please let us know.
Mateus

July 8, 2024 at 5:19 pm #15914857

bashirA-3

I have a backup of the current site and you can debug the problem on the live site

July 8, 2024 at 8:02 pm #15915542

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Thank you for letting me know.

I debugged this a bit further and was able to find the issue.

Upon further review, it looks like the WooCommerce endpoint wc/file/transient was translated into wc/file/transiente in Italian inside WPML -> String Translation causing the following warning:

[08-Jul-2024 19:54:51 UTC] PHP Warning:  preg_replace(): Unknown modifier 'f' in sitepress-multilingual-cms/classes/url-handling/class-wpml-endpoints-support.php on line 142

I also checked that the German version had not been translated, hence it working properly.

I went ahead and make sure that the Italian version of that string had the same content as the English string and this fixed the issue.

Please test it again and confirm it is working now.

Best,
Mateus