This thread is resolved. Here is a description of the problem and solution.
Problem:
The client reported an issue where translations were not being saved when an Advanced Custom Fields (ACF) field contained the live website's primary domain URL. Although the translated text was visible in the Advanced Translation Editor (ATE), it was not reflected on the front end after saving. This issue was specific to ACF link fields containing the primary domain URL, and did not occur with other external domain URLs.
Solution:
We investigated the issue by replicating the environment and testing various configurations. The problem was identified as a bug in the WPML plugin related to how URL translations were handled. We provided a workaround by modifying a specific line of code in the WPML plugin files:
if ( ! ICL_TM_COMPLETE === $job->status || ! isset( $job->elements ) ) {was changed to:
if ( ICL_TM_COMPLETE !== $job->status || ! isset( $job->elements ) ) {This change corrected the issue, allowing the translations to be saved correctly. We also recommended adding a custom XML configuration to ensure proper handling of link translations.
Please note that this solution might be outdated or not applicable to your specific 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. If the issue persists, 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.
This topic is split from https://wpml.org/forums/topic/wpml-translated-urls-not-reflecting-on-front-end-for-secondary-language-pages/
This topic contains 32 replies, has 2 voices.
Last updated by 2 weeks, 6 days ago.
Assisted by: Dražen.