This thread is resolved. Here is a description of the problem and solution.
Problem: WPML returns ID of the image with acf field
Solution: Make sure you have the latest version of ACF Multilingual installed
Relevant Documentation: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/
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 contains 6 replies, has 2 voices.
Last updated by agataS-7 4 years, 5 months ago.
Assisted by: Alejandro.
Author | Posts |
---|---|
August 26, 2020 at 1:49 pm | |
agataS-7 |
I add images with acf field. When this field is being translated, wpml returns ID of the image, not url. I have all settings set to "copy" this field. |
August 26, 2020 at 2:07 pm | |
August 26, 2020 at 3:06 pm #6878659 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
Hello there! I can see that "ikonka_1" is set to return an array while ikonka 2 and 3 are set to return an address, can you try setting the first one up to return an address and check if that fixes the problem? I also noticed that you had translated "Ikonki do produktu" (which i guess is the one giving you trouble) into English but you don't seem to actually need that so please: - Go to Custom fields and change the language to English by clicking the "English" link in the field groups overview page - Delete the English translation of "Ikonki do produktu" permanently (so, from the trash as well) - Go to WPML > Settings > ACF Field Group > Set to "do not translate" - Make sure the images are all set to return the URL address in the group field and then try again. This should fix the problem. |
August 26, 2020 at 7:13 pm #6880231 | |
agataS-7 |
Hello! this didn't work - when I set "do not translate " to the ACF Field Group, it is not visible at all. When it is set to "copy" the problem remains - it returns ID of the image, not the url. |
August 27, 2020 at 11:45 am #6885715 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
Can you tell me in what part did you add the code that you showed Mateus before? And also, can i have permission to try a few things in your site? i'll probably need to delete the group field or echo content on front-end so please let me know first what restrictions i have so i avoid creating any issues with you. |
August 27, 2020 at 2:50 pm #6887375 | |
agataS-7 |
The code is added to the functions.php in plugin "theme-customization-master", so basically it works just like functions.php in child theme. You can "try few thinks" and delate the fields, I have full backup of site. |
August 28, 2020 at 8:49 am #6892445 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
I had tot ally missed the most obvious part. you're missing a plugin: "Advanced Custom Fields Multilingual" Without that plugin the ACF code will not be multilingual-compatible so it would not work! Please install it and follow this guide to know how to configurate it: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/ Last but not least, after having it configured, please make a change to the products and update the translations, that way, they will be updated with the new ACF setting in the translated languages and should start working correctly. Let me know how it goes. |
August 29, 2020 at 8:59 am #6898599 | |
agataS-7 |
Okej, installing ACF plugin solved the problem. I thought I can go without it, as the fields where recognized and set to "copy". Thank You for support. |