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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 |
- | - | - | - | - | - | - |
Supporter timezone: America/Lima (GMT-05:00)
Tagged: Bug
This topic contains 2 replies, has 0 voices.
Last updated by Andreas W. 4 months, 3 weeks ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
February 12, 2025 at 7:22 pm #16698756 | |
Noothan Mathew |
Background of the issue: Symptoms: Questions: |
February 14, 2025 at 4:14 pm #16707383 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, If your ACF Field Group uses the translation preference "Expert", then please make sure that the "Repeater", any "Group" or "Flexible Content" field is set to "Copy". The Taxonomy field also should be set to "Copy". If the ACF Field Group uses the translation preference "Same fields across languages" these settings will be applied automatically. Fields that are set to copy are not supposed to show up on the WPML Translation Editor. You need to translate the taxonomies and their labels and slugs at WPML > Taxonomy Translation. If the taxonomies are translated, then the issue might be about how the fields are rendered. Which method are you using to render the fields? Best regards |
February 16, 2025 at 8:51 pm #16711286 | |
Noothan Mathew |
Hi, Thank you for getting back to me. I can confirm that the ACF Field Group uses the translation preference "Same fields across languages". Here is the ACF component's json for reference: { I am a newbie to wordpress and ACF components and I have a few questions due to this reason, please bear with me. 1. I have added a taxonomy value to the backend of a test page (EN - ACF Screenshot), and I was expecting to see the translated value when I checked the 'ES' version of the page (ES - ACF Screenshot), but it is empty - is this the expected behaviour? What am I missing here? For context: The taxonomy I have used for testing is already translated. See the attached screenshot (ES taxonomy translated proof) for proof. 2. I am using the method get_field to output the field values on the front end - eg: $taxonomy = get_field('test_taxonomy', $post->ID); It works on the English locale, but not on the 'ES'. Again, am I missing something here? Thank you, |
February 18, 2025 at 5:22 pm #16720381 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Are these taxonomies translated at WPML > Taxonomy Translation? --- "Same fields across languages" should only be used if you translate the content with the WPML Translation Editor. Use "Different fields across languages" if the fields are getting translated using the WordPress Editor. --- According to your JSON it looks to me as if the Repeater is messing with the translation preference setting I would like to request temporary access (wp-admin and FTP) to the site to investigate the issue further. The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it. IMPORTANT If you cannot see the "wp-admin / FTP" fields, your post and site credentials will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields. The private reply form looks like this: The next time you reply, click on "I still need assistance". Video: Please note that we are obliged to request this information individually on each ticket. We are not permitted to access any access information that was not specifically submitted on this ticket in the private response form. |
February 18, 2025 at 7:53 pm #16720751 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
I updated the translation of the page, so that the taxonomy can get copied, and now it seems to work: hidden link |
February 18, 2025 at 8:19 pm #16720873 | |
Noothan Mathew |
May i know the changes you did please? And why is the repeater field showing "english" value in the backend and frontend? See screenshot and link - hidden link And also is it normal for ACF taxonomy to not show up in the WPML translation editor as well? See screenshot. We use Smartling for translation services, is there a way we can send "ACF taxonomy" in bulk to translate? |
February 18, 2025 at 8:43 pm #16721001 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Thank you for your feedback! When opening the original page inside the WordPress Editor, the translation status inside the right sidebar was "In progress". I clicked the symbol (cogwheel), the translation editor opened and I saved the translation. The translation status changed to "Complete" (pen symbol). Let me explain what happened behind the scenes. Please revise the following documentation: We can set fields to: translate - will display the field inside the WPML Translation Editor: copy - will not display the field's value inside the WPML Translation Editor nor include it in the XLIFF file, instead it will copy the field's value once the translation is completed. copy once - will do the same as "copy" but only when translating for the first time. This is what you would use if you use the WordPress Editor for creating the translation. --- The Taxonomy field returns an object which includes IDs, slugs, etc., and is by default set to "Copy" or "Copy once". It's field values should not be included in the translation job. Why is that? 1) We can not translate ID with the WPML Translation Editor as a translator or translation service would not know how to handle them Instead, WPML will handle the interchange of the ID for each taxonomy behind the scenes and pull the translated terms from the database. this should work on Frontend, while on the WordPress Editor, you will still see the original term on the translated page. |
February 18, 2025 at 8:59 pm #16721039 | |
Noothan Mathew |
Ok, thank you. Were you saying that completing the translation helped solving the problem? or did you do something else? Because, i just put the the page back to translation again (translation status inside the right sidebar is "In progress"), but the values still work. May I know why the repeater fields are "NOT" still working though? And thank you for explaining why taxonomy fields are not auto translatable - makes a ot of sense now. |
February 18, 2025 at 9:37 pm #16721107 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
I just completed the translation. For each field to work, you will need to edit the original field, save the page, and complete the translation. This worked on my test. |
February 18, 2025 at 9:40 pm #16721112 | |
Noothan Mathew |
Okay, do you have any findings on why the repeater fields are not displaying the translated values? - hidden link It would be great if you can respond to my other questions in one ago, as we are not doing a live chat, saves us time. |
February 18, 2025 at 9:58 pm #16721177 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Your example leads to a 404 error. Could you please send me the title or permalink of the original content, that you are trying to translate? Take note that each time a translation field or group setting is changed you will need to edit the original content or the specific field on the original content, save the page, and then translate it again. Did you try to edit the taxonomy inside the repeater field on the original content, save the page and complete the translation again? --- About your earlier questions (sorry, if I have forgotten to reply): "And also is it normal for ACF taxonomy to not show up in the WPML translation editor as well?" "We use Smartling for translation services, is there a way we can send "ACF taxonomy" in bulk to translate?" The ACF Field is not getting translated, it is getting copied. The translation for taxonomies occurs at WPML > Taxonomy Translation. Also, taxonomies that are assigned to posts will get translated together with those posts, but this only happens once and not for every post. If you would like to have a translation service to translate all the categories, you would need to create one post, add all untranslated taxonomies to it, and then send the post to translation. If the taxonomy was not yet translated, it will be translated together with the post. --- |
February 18, 2025 at 10:12 pm #16721180 | |
Noothan Mathew |
Thank you for getting back to me. The test page link I have shared is not published, you need to be logged in to view it (it is the same page you tested earlier.) Title is "Test new", post type is page I just tried to edit the taxonomy inside the repeater field on the original content, save the post and complete the translation again. And after editing the "ES" page looks as in the screenshot attached. Now, after completing the translation, I get an error on the frontend saying the taxonomy (for both repeaters and taxonomy )is invalid, I guess it is possibly because of the way how I am pulling it on the frontend? This is the code : echo 'test_taxonomy<br>'; $taxonomy = get_field('test_taxonomy', $post->ID); print_r($taxonomy); echo '<br>test_taxonomy_repeater<br><br><br>'; $taxonomyrepeater = get_field('test_repeater_taxonomy', $post->ID); print_r($taxonomyrepeater); echo '<br><br><br>'; AM I using the right method? Please login and view - hidden link |
February 18, 2025 at 10:40 pm #16721220 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
I am not sure if this is a bug or an issue with the template's code. I will need to run some further tests to confirm this. Take note that for the Repeater to work you usually need to set up a loop: |
February 18, 2025 at 10:44 pm #16721223 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
From what I see on your template you are trying to get the repeater but not the subfield. Could you please try this instead: // Check if rows exist. if( have_rows('test_repeater_taxonomy') ): // Loop through rows. while( have_rows('test_repeater_taxonomy') ) : the_row(); // Load sub field value. $sub_value = get_sub_field('repeater_taxonomy_field'); // Escape output before displaying it. echo esc_html($sub_value); // End loop. endwhile; // No value. else : // Do something... endif; |
February 18, 2025 at 10:57 pm #16721237 | |
Noothan Mathew |
Hi, I tried as per your comments and the taxonomy values are coming through, but the repeater field is not displaying the respective translated language value. Please login to view - hidden link |