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: Documentation request, Known issue
This topic contains 70 replies, has 2 voices.
Last updated by Andreas W. 1 month, 3 weeks ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
October 2, 2024 at 8:25 pm #16247392 | |
ruiG-5 |
Background of the issue: Symptoms: Questions: |
October 2, 2024 at 11:19 pm #16247618 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, After changing the setting you will currently need to edit the field again and then open the WPML Translation Editor. We provided a workaround for this issue in this errata: Best regards |
October 2, 2024 at 11:23 pm #16247619 | |
ruiG-5 |
Damn. I'm guessing I'll have to add changed fields to this query. Can you confirm? |
October 3, 2024 at 12:02 am #16247664 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
This code is just a one time use purpose. It should not be active all the time. Example for a post that includes the ACF field name "simple_field" inside the config variable: add_action('wp', function(){ $config = [ 'post_type' => 'post', //Post type slug 'meta_key_name' => 'simple_field' //Custom field key ]; if (!isset($_GET['wpml_sync'])) { return; } set_time_limit(0); do_action('wpml_switch_language', apply_filters( 'wpml_default_language', null )); $all_posts = get_posts([ 'post_type' => $config['post_type'], 'posts_per_page' => -1, 'suppress_filters' => false ]); if (empty($all_posts)) { return; } foreach ($all_posts as $post) { do_action( 'wpml_sync_custom_field', $post->ID, $config['meta_key_name'] ); } wp_die('Done!'); }); - Visit your website and add this to your URL: /?wpml_sync (e.g. I did not test yet how it would behave if you use arrays of post types and fields. |
October 7, 2024 at 3:20 pm #16262453 | |
ruiG-5 |
Doesn't do the trick mate. Check attachments. |
October 7, 2024 at 6:08 pm #16263231 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
The 'meta_key_name' refers here to the field name, like for example "button". Fields like "Group", "Repeater", or other Layout Fields alsways need to be set to "Copy", so that the subfields will be available. If you use the Expert mode for the field settings, please make sure to follow this guide: Basically there are two modes for each field group which will adjust the mentioned settings automatically. Important to understand is: "Same fields across languages" is the settings to use when translating the fields with the WPML Translation Editor. This means, also in Expert mode, you should use those settings as reference when translating the fields with the WPML Translation Editor. |
October 8, 2024 at 1:51 pm #16265716 | |
ruiG-5 |
Ok. I have changed all ACF fields to match - in any case, groups can be selected as "don't translate", still works tho. Check attachments. I have used this code as well, but still not working. add_action('wp', function(){ if (!isset($_GET['wpml_sync'])) { set_time_limit(0); if (empty($all_posts)) { foreach ($all_posts as $post) { wp_die('Done!'); I'm not sure if you can access, but this the advanced translation URL: hidden link |
October 9, 2024 at 12:05 pm #16269922 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Could this be related to the fact that the field name "link" is used more than once inside ACF? You might experience issues if the same field name is used more than once inside the same ACF Group or even between different groups. This will lead to missing entries on the WPML Translation Editor. Source (see notice at end of this section): |
October 9, 2024 at 1:44 pm #16270701 | |
ruiG-5 |
I have a repeater field and inside one field name called "link". In this block there isn't any other field called "link". |
October 9, 2024 at 4:53 pm #16271823 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
The rule applies for all ACF Fields, in all your blocks or field groups. Notice from documentation: Please verify if this is the case. |
October 9, 2024 at 5:04 pm #16271845 | |
ruiG-5 |
In any case that's not my issue. My issue remains having fields available to translate when I've explicitly choosen to copy or don't translate. |
October 9, 2024 at 5:57 pm #16271960 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Sorry for the misunderstanding. It might be the case, that the fields still show up as the translation job was started before the field setting was changed. Go to WPML > Translation Management > Jobs to cancel the current job. Then open the WPML Translation Editor again. Does this solve the issue? |
October 11, 2024 at 11:09 am #16279063 | |
ruiG-5 |
Doesn't work. Still having the same issue. |
October 11, 2024 at 4:55 pm #16280826 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further. You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it. IMPORTANT The private response form looks like this: Next time you reply, click "I still need assistance." Video: Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form. Best regards |
October 14, 2024 at 11:39 am #16285728 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
My apologies if I repeat myself, as I had mentioned this earlier: Each field name in each group should be unique. You use for example the field name "title", "content", "button", etc. in different field groups and this is not recommended, as it can lead to unexpected issues when trying to translate those fields. Fields that should not appear on the WPML Translation Editor should be set to "Copy". |