This thread is resolved. Here is a description of the problem and solution.
Problem:
You are trying to disable auto-translate links in ACF fields for a site under development and were unable to try the solution from the sandbox provided earlier.
Solution:
If you're experiencing this issue, we recommend using the
wpml_sl_blacklist_requests
filter to prevent WPML from adjusting links. You should add the slugs of the pages where you want to disable this feature. For example, adding 'test-page-de' will ensure that the DE link remains in the EN page. For more detailed guidance, please check the documentation on linking to pages in a different language here: https://wpml.org/documentation/getting-started-guide/sticky-links/#linking-to-pages-in-a-different-language.
If this solution does not apply to your case, or if it seems outdated, 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.
Tagged: Compatibility, Documentation request
This topic contains 10 replies, has 4 voices.
Last updated by Dražen Duvnjak 1 month ago.
Assisted by: Dražen Duvnjak.
Author | Posts |
---|---|
September 25, 2024 at 2:28 pm #16221178 | |
igorL-6 |
Background of the issue: Symptoms: Questions: |
September 25, 2024 at 2:37 pm #16221258 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, If you need further help, please reply to this ticket. Regards, |
September 25, 2024 at 2:53 pm #16221293 | |
igorL-6 |
I did not find a solution to my problem in the code. We need the URL link in the ACF field from the English page to link to the German page. Even though we don't have automatic translation turned on, it still translates the German URL back to English. We are working with a custom template. This issue occurs even when we insert an absolute internal URL into the custom ACF block. Once the page is loaded, the URL is replaced. When we place the URL outside of a link (for example, in a paragraph tag or as simple text inside a div), it shows the correct URL. However, when we insert it in an <a> tag as a link, the problem arises. In our PHP files and in the admin panel, the URL is correct, but on the frontend, after generating the content, the URL is not correct. Can you help us with this? |
September 25, 2024 at 4:37 pm #16221937 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, 1. I created a sandbox site for you. 2. What are the translation settings for this ACF field? 3. Can you please send me a link to a page on your site where I can see this problem? Also please share your site's Debug information. You can read about it here. http://wpml.org/faq/provide-debug-information-faster-support/ Thanks, |
September 26, 2024 at 12:42 pm #16225197 | |
igorL-6 |
Hey, 1. I cannot replicate the issue because the ACF Pro plugin is not installed in this sandbox, and I am using a custom template. 2. I have attached the necessary files. 3. I cannot send you a link because the website is currently only in local development. //Attachments |
September 27, 2024 at 6:47 am #16228244 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi and thanks for the screenshots. I'm confused. You set the WYSIWYG field to Don't translate." So, how is all the text (even without talking about the link) translated into German? You should not be able to translate it if it is set like this. Can you please confirm you follow our guides on how to work with the ACF plugin? https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/ Which translation mode have you selected for this field group? I've installed the ACF Pro plugin on the staging site. Please try to reproduce the problem there. Please note that my weekend is Friday-Saturday, and I'll be able to continue to check this issue and help you on Sunday. Regards, |
October 3, 2024 at 3:07 pm #16250938 | |
igorL-6 |
Hi, I uploaded my settings and block to the sandbox, and I was surprised that my custom language switcher worked. So, I checked the WPML configuration, and we had different settings. For Pages, I had it set to "Translatable – use translation if available or fallback to default language." I tried switching it to "Translatable – only show translated items" according to your setup, and now my custom language switcher works correctly. I still have an issue, as you can see in the sandbox, where if I insert a link to the same page but in another language, the link changes to the current language. If I insert a different link, it doesn't translate, but if it's a link to the same page in a different language, it gets translated to the current language. |
October 4, 2024 at 5:59 am #16252427 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Hi, This is Waqas, I'll be looking into this issue while Itamar is on vacation today. Can you please explain a little more about the following?
Is it about the same WYSIWYG or ACF fields you're trying to insert the link into? Or are you referring to inserting the link directly into page/post content? Regards. |
October 8, 2024 at 3:14 pm #16266280 | |
igorL-6 |
Hi, Here is the problem: I inserted a link to the German page in the admin, but on the frontend, the URL is translated to the English page. The link is in - "website in german" hidden link And in the German version, the problem is the same. I inserted the English link in the admin, but on the frontend, the link is translated to the German one. The link is in - "website in english" hidden link |
October 9, 2024 at 12:44 pm #16270248 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, and thanks for the description. I'm consulting our second-tier supporters about this case. I'll update you here when I have their reply. I appreciate your patience. |
October 15, 2024 at 9:42 am #16289777 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, thanks for coming back. Itamar is OFF; so I will be handling the case. I have checked the issue you reported, and this is expected, if you wish for WPML to not adjust links, you need to use wpml_sl_blacklist_requests filter and add those pages slugs there, for example on sandbox site I have added test-page-de, and it works fine now. There is DE link in EN page. Please check for more info: Regards, |