Skip Navigation

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

Problem:
The client was facing an issue where internal links on their page were not being translated automatically on their live site, despite the SQL code working on their stage site.
Solution:
We investigated the issue and initially updated the Site URL and WordPress URL in the database to include HTTPS, which did not resolve the problem. Further analysis indicated that a specific script in the header file was causing the issue. We recommend the following steps:
1. Temporarily disable the problematic script.
2. Make a small change to the page or products where the issue was occurring and save the changes.
3. Complete the translation update.
4. Re-enable the script.
This process should trigger a refresh of backend processes and result in the correct translation of links. If the links are still not being translated correctly, please open a new support ticket with us.

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.

Tagged: 

This topic contains 17 replies, has 2 voices.

Last updated by Prosenjit Barman 10 months, 2 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
January 18, 2024 at 5:00 am #15197684

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There

I hope this message finds you well. I am writing to provide an update on the issue.

After a thorough investigation and several tests, I have identified a potential solution to the problem. Our initial findings revealed that the Site URL and WordPress URL were incorrectly stored in the database (without HTTPS). Consequently, we updated the URLs to include the correct protocol. Unfortunately, this adjustment did not yield the expected results.

However, further analysis revealed that a specific script embedded in the header file(Screenshot: hidden link) was contributing to this issue.

To address this, I temporarily disabled the script and proceeded to retranslate the product. Remarkably, this action resulted in the links functioning correctly. To ensure this was not a one-off occurrence, I re-enabled the script and then tested the process again by creating and translating a new product. The links are still being translated accurately.

It appears that disabling and then re-enabling the script may trigger a refresh of certain backend processes, which in turn solves the issue with the link translations.

So, please make a small change to the page/products where you were having the issue and save the changes. After that, complete the translation update. The link should be updated correctly in other languages.

Let me know the update. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

January 18, 2024 at 10:30 am #15199262

marcoB-110

Hello Prosenjit,

Thank you for your research.

I tuned off the script "libraries" because that file is not present regardless.

Regarding the other script. I will keep that in the back of my mind that I might need to disable that temporarily.

I noticed that if I make a new product page with links, the links are translated correctly, so that's looks good.

My client Marco have 2 questions:
- With the latest article (hidden link), the first 2 links in the article were redirecting to the NL after updating. Then I deleted the link and added the link again and then it was redirecting to the right EN page. So it seems that some URL's do need an update?

I also updated the home page (it was without any reason translated into EN (the dutch page). Now after the update the redirects to other 'normal' pages are redirected oke, but redirects to woocommerce related pages weren't changed. You can check the home page.

January 18, 2024 at 7:05 pm #15201903

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
I'm glad to know that your client has confirmed the links are functioning properly.

Please find the response to the queries below.

- Yes, updating the translation is essential for the link to display correctly in other languages. It appears that the script may have disrupted the automatic link update, but you can be confident that any links added to new pages will update correctly. For existing pages, you'll need to manually update the link and then its translation.

- I've reviewed the Dutch homepage and can confirm that all links to WooCommerce pages are correctly directed to their Dutch version. There don't seem to be any issues there. However, on the English version of the Homepage, I did notice that some links are incorrectly pointing to the Dutch WooCommerce pages. Could you kindly update the links in the Dutch version of the Homepage, save your changes, and then proceed with updating the translation? By following these steps, I believe the links on the English page will be correctly updated.

Please let me know how it goes. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit