[Resolved] Link Translation with WPML not picking up all links
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with links on a Spanish site still pointing to UK pages despite using the WPML Link Translation tool. The problem affects about 500 links, particularly absolute URLs in buttons, which do not automatically translate in the Advanced Translation Editor (ATE). Solution: We identified that the links need manual translation and recommended clearing the site's cache to ensure the correct links display. Additionally, the client should adjust the Advanced Custom Fields (ACF) Link Fields setting from "Translate" to "Copy" to allow automatic adjustment of links. It is also advisable to set all ACF Field Groups containing fields translated with the WPML Translation Editor to "Same fields across languages" for consistency. For more details, visit WPML documentation on translating sites built with ACF.
If this solution does not resolve your issue, or if it seems outdated or irrelevant 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. Should you need further assistance, please open a new support ticket at WPML support forum.
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.
Background of the issue:
I have a site being translated from English to Spanish, currently in staging. I am using WPML's Link Translation tool to ensure hyperlinks point to the correct 200-code version of UK pages on UK content. However, on the Spanish site, some links still point to the UK pages. I can see the links in the ATE but cannot feasibly translate each URL instance manually. I have tried editing the UK page and re-running the Link Translation tool multiple times.
Symptoms:
Around 500 links remain incorrectly pointing from Spanish to English pages despite using the Link Translation tool.
Questions:
Why are some links on the Spanish site still pointing to the UK pages despite using the Link Translation tool?
How can I ensure all links are correctly translated without manually editing each URL?
Could you please increase the WordPress memory limit (WP Memory Limit) to at least 256 MB? WPML requires at least 128 MB.
Your current values are:
PHP Memory Limit 256M
WP Memory Limit 64M
To do this, you need to connect to your website's server and open the wp-config.php file in a text editor. The file is located in the WordPress root directory.
Add this code to the wp-config.php file to increase WordPress's memory:
define ('WP_MEMORY_LIMIT', '256M');
Add this just before this comment:
// That's all, stop editing! Happy blogging.
The current values can be viewed under WPML > Support > WordPress.
After adjusting the limit, please go to WPML > Settings > Update internal links and use the dialog "Scan now and adjust links". This may take a while if there are many linked contents.
Note that this will only work if all linked contents have been translated into all languages and published.
If this does not solve the issue, please let us know.
Hello Andreas, this has been increased to 256MB now.
I have run the Target Link Translation again, and I still have around the same number of untranslated links (mostly in buttons, but also in content links).
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
I'd be happy to take a closer look at this and request temporary access (wp-admin and FTP) to the website to investigate the issue further.
You'll find the necessary fields below the comment section if you log in to leave the next reply. The information you provide will be private, meaning only you and I will be able to see and access it.
IMPORTANT
Please be sure to create a backup of the website and database before granting us access.
If you don't see the "wp-admin / FTP" fields, your login credentials for the post and website will be set to "PUBLIC." Do NOT publish the information unless you see the required wp-admin / FTP fields.
The private reply form looks like this: hidden link
When replying again, click "I still need assistance".
Video: hidden link
Please note that we are required to request this information individually on each ticket. We are not permitted to access any login information that was not specifically provided in the private reply form for this ticket.
The developer has advised that you should be able to access the account from the same details.
[redacted as I could see this non-privately, how can I attach these without it being public?]
Do let me know if this helps, I have gotten in touch with the dev team again to make sure the actual login works - the above seems related to FTP access but I have been advised the credentials are also working.
This is definitely something that has come up from previous threads I have found, but there are examples where Absolute URLs are not being translated. For example:
hidden link
Has a link to:
hidden link
[Anchor: Volver a llamar]
This is a 200 code, absolute URL. Across the Spanish site, this seems to affect buttons specifically. These URLs tend to appear in the ATE, but do not get autotranslated.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
It looks like in this case the links need to be translated. Further, I needed to clear the site's cache to make the correct links show up here: hidden link
The reason for this is that you have set the ACF Link Fields to "Translate".
If you want the links to adjust automatically, the link fields need to be set to "Copy".
I would further suggest setting all ACF Field Groups that contain fields that are translated with the WPML Translation Editor to "Same fields across languages".