In one specific custom text field (created by Meta Box), internal links do not automatically get translated if the translation of the target page becomes available. The field text itself can be translated fine. So far I have seen this problem in 3 posts, only in that same field. Our workaround is that we translate the links manually.
What could be the reason this fails for that single field?
- Have you already translated the target page for which you are adding the internal link to the field? Or do you translate that target after adding link to the field?
Please let me know and I'll try my best to help you further on the matter.
This is the situation:
1. We have a source page in English and we link to a target page that is available in English and German.
2. Later, we translate the source page to German.
3. Normally, the links in the source page don't require any manual modification, because WPML translates them. But in this case that doesn't happen with links in that particular field. In the German translation of the source page, they keep pointing to the English target page.
The text field ID is "activity_content_introduction_text". It is translatable (see screenshot). It is available in a Meta Box section in the backend and is rendered via a Meta Box View to the frontend. The View is inserted into a post template (Kadence Elements, using Gutenberg, no other page builder). All of this is probably not a problem because it's the same as many other fields we have, and I didn't notice issues there.
The links that fail all point to the post type "town", but that could be a coincidence.
I need to take a closer look at your site. So I request temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.
Your next answer will be private, to share this information safely.
Also provide detailed steps to reproduce the issue and links to pages in admin and on frontend. Specially another field which is working fine, so I can compare both accordingly.
IMPORTANT: Please take a complete backup of the site to avoid data loss.
I solved the issue. I suddenly remembered the WPML Custom XML Configuration. The WPML link translator skips custom fields by default, so any fields it must process need to be added to the XML. I had done that before but not for this field.
I now added this to the section, and that fixed it:
activity_content_introduction_text
Thanks for your assistance!
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.