This thread is resolved. Here is a description of the problem and solution.
Problem:
You are experiencing issues with links not automatically adjusting to the correct language version when duplicating pages across different English language versions (UK, Australian, Canadian) on your website. This problem specifically affects links populated from the link type of ACF field.
Solution:
We have identified a bug affecting the translation of the LINK field within repeater/flexible fields. While we are working on a permanent fix, we recommend using the
wpml_permalink
hook as a temporary workaround. You can find more information and guidance on implementing this solution through the following documentation links:
- https://wpml.org/wpml-hook/wpml_permalink/
- https://wpml.org/forums/topic/acf-fields-link-translations-arent-applied-properly/
If this solution does not resolve your issue or seems irrelevant due to being 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 further assistance is needed, 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.
Tagged: Bug
This topic contains 9 replies, has 2 voices.
Last updated by Dražen 4 months ago.
Assisted by: Dražen.
Author | Posts |
---|---|
September 6, 2024 at 9:40 am #16147962 | |
clfM |
Background of the issue: We have flexible content fields that the pages are build of. And in the multilingual setup we have "different fields across languages" set for the Flexible Content fields group hidden link We need to have the duplicates of the pages created because the 3 lang versions will all be in English. Thus, we are not considering translation option for creating the pages. Nonetheless, we have tested this with translation feature as well and the issue with the links persist. We do not want to go through all the pages and edit the links manually. We need to have the links adjusted accordingly for all the mentioned links on the page once the page is created. We see that this is working for certain types of ACF fields, i.e. the links generated via the relationship field get auto adjusted despite the page where the link links to hasn't yet been created within that lang version. Pls see this page for reference Symptoms: Questions: |
September 6, 2024 at 9:49 am #16148032 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, I created a minimal installation of WordPress, WPML, and all necessary WPML add-ons, and themes. You can access the WordPress dashboard using the link below: Try to replicate the issue with a simple example page. This will help us to report the probable issue and solve the possible problem faster. Regards, Drazen |
September 6, 2024 at 11:58 am #16148811 | |
clfM |
How do we add our WP theme to this installation? Not sure if we can quickly replicate all necessary settings in this minimal installation of WordPress you have created. Wouldn't it be easier if you just log in and test everything on out staging server? We can grant necessary access. I described the issue in the original message and the page where you can see it. |
September 6, 2024 at 12:06 pm #16148887 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, since you are using a custom theme we would need to test it without, I am trying to test if tissue still happens in minimal and with the WP default theme, that is why we can confirm quickly if it is a bug or not test site. If I understand correctly your case, this should not be complicated to replicate: - Set up WPML language and related settings as on your website Check if the issue still happens. Please check if I have correctly explained your case or if something missing and if you can try to reproduce it. I can try to do the same steps myself but I would like you to do it since there might be some settings /steps you are using that I am not or are not recommended. Regards, |
September 6, 2024 at 12:09 pm #16148889 | |
clfM |
Hi Drazen, I don't seem to have enough access permissions to the files to add plugins. hidden link How do I do it? |
September 6, 2024 at 12:18 pm #16148938 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
hello, The site key was wrong, you can install WPML plugins now from the Comercial tab. Regards, |
September 6, 2024 at 12:51 pm #16149110 | |
clfM |
Hi Drazen Pls see this page hidden link which is a duplicate of the homepage, not translation. The issue with links not adjusted can be seen as I explained in the original message with the link ACF type of field if the page doesn't exist within this lng version yet. But it gets adjusted for relationship type of the field. |
September 9, 2024 at 6:47 am #16153883 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, thanks, I wanted to check if the link works if the link page is translated, but after re-translating and creating other pages it seems your code doesn't show any fields on the front, so it might not be adapted. Anyway, there is currently a bug from our side where the LINK field inside repeater / flexible filed it not being translated correctly. We are working on a permanent fix, but it will take time. In the meantime, workaround is to translate manually or try to use wpml_permalink hook: - https://wpml.org/wpml-hook/wpml_permalink/ Hope this helps. Regards, |
September 13, 2024 at 12:23 pm #16175448 | |
clfM |
Hello Drazen, Thank you for your help with the issue of the link fields not to be auto adjusted to the translation. We have used your suggested workaround which looks to be working fine as a solution for the time being. Yet, we have faced another issue with the links to be not translated in the content of the post - neither in the content, not in the flexible content additional fields. We have a custom post type "Stories" where we have detected this issue after having created a duplicate of the story hidden link. This issue also persists with the default posts hidden link We have replicated it also on your clean WP installation hidden link - pls see this for reference hidden link. Scan doesn't help either hidden link Pls advise what we can do about it. Thank you. New threads created by Dražen and linked to this one are listed below: https://wpml.org/forums/topic/split-another-issue-with-the-links/ |
September 16, 2024 at 5:32 am #16181224 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, Glad to hear that it now works. As the original issue is resolved and we limit 1 issue per ticket to keep things clear I will open a new ticket for your other issue. Regards, |