Home›Support›English Support›[Resolved] Link translations can't be removed in Advanced Translation Editor
[Resolved] Link translations can't be removed in Advanced Translation Editor
This thread is resolved. Here is a description of the problem and solution.
Problem:
Accidentally translated some internal links, ATE does not allow to enter an empty translation, so I can not remove the translation.
Solution:
ATE removes link translations if they are the same as the original.
Hence, if you want to delete a translation for a link, so that the secondary language page uses the original link, simply copy the original link to the translation and it will do that.
Relevant Documentation:
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.48 hours from now. Thank you for your understanding.
A translator translated some internal links by mistake (the target pages are not translated yet so the links won't work). I can't correct that mistake. Removing the translation is not allowed by the WPML ATE. That's a bug because:
- it should be possible to remove link translations in case of mistakes.
- if we decide that a translated page should be deleted, we should also be able to correct links pointing to that page.
Right now, the site is left with links causing 404 errors.
Manually entering the English URL is not possible either because of this bug: https://wpml.org/forums/topic/all-internal-links-translation-were-gone/. Note that it says it's the "expected result" but it's a bug: purging all link translations just because the translation of one link is the same as the original link should not happen.
Have you tried manually entering the English URL? I have replicated this in a test site and links were not purged.
I have followed these exact steps:
- Create post with links
- Make translation to untranslated (nonexistent) post
- Re-translate link to be the same as original link
- Make small update to original page
- Other link translations were not purged
The site I did this on is this one, you can see the post I am talking about (Links): hidden link
Please use the test site to try to replicate the issue, and if we succeed in that I will escalate the issue and see what we can do.
It's really hard to know what to do if your colleague says to not copy URL values from the original language to the translation. Please see https://wpml.org/forums/topic/all-internal-links-translation-were-gone/: "It is happening because of copying the same links to secondary languages. We don't have to do that and should just ignore links that can't be translated."
In your demo site, I translated the link to post 3 using the English URL. It doesn't seem to purge other translations. But in the frontend it still points to the Spanish URL: hidden link.
Sorry, I have no idea what's supposed to be the right way to do this.
In order to prevent any confusion going forward, I want to explain to you exactly how WPML handles links:
- If the translation is an exact copy of the original link, it will remove it from the translation editor
- On the frontend side, if a link is not translated WPML will use the same link, or point to a translation if available
- Hence, so long as you want links to point to the same content across languages (pointing to translated content when available and to original content when not), you don't need to translate links
In your case, if you have a link which is pointing to a not yet translated page, thus causing 404 errors, and you want to change it to point to the original language version of that page, you can simply copy the original value of the link to the translation.
The Advanced Translation Editor *should* not remove any translated links which are not exact copies of the original link.
Please see here, I believe I have replicated the exact issue. The translation of the first link in the post, the one linking to Post 1, is pointing to a non existent post. If I wanted it to point to the original language post, I would copy the original value of the link to the Spanish version. hidden link
Please tell me if this answers your question and helps you resolve your issue.
Anyway, let's see if things keep working now. The only remaining question is what the Translate Link Targets tool is for? Links are translated automatically anyway, so why would you ever run this tool?
Of course, I understand if you feel confused. Of course that was never our intention, however since I see our documentation may be missing, we will go over it and update it as necessary, thank you for pointing that out to us.
The "Translate Links Targets" tool should be used for embedded urls, for example when adding urls with some page builders.
However, if it's content that WPML can access directly and handles the links by itself, there is no need for it, as you noticed.
If you confirm that the original issue for which you opened the ticket is resolved, we can close it and mark it as such.
If you need anything else related to the original issue, please don't hesitate to ask.