Skip Navigation

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: 

This topic contains 6 replies, has 2 voices.

Last updated by Ahmed Mohammed 1 year, 6 months ago.

Assisted by: Ahmed Mohammed.

Author Posts
May 18, 2023 at 12:31 am #13668491

Camilo

Hi,

I've created an ACF Options page and added fields to it. The repeater has two fields, a number (ID) a text field (Number).

I've set the translation this way:

- ACF Group: Expert
- Group: Copy
- Repeater: Copy
- Number: Copy
- Text: Translate

The main language of the website is English and it's translated to Portuguese. So I first add information in English and everything works as expected. Then I switch the language in the admin bar and change the Text fields to Portuguese and save.

When I check the front-end, the translation is shown as expected and everything works fine. But when I go back to the options page to update the translation, all fields are shown in English so I would have to go one by one to update them again to Portuguese, do the changes I meant, and save.

Again translations show up as expected, but every time I go back to the translated options page, the options are in English again, although they've been clearly correctly saved to the database.

This is becoming very annoying as every time we have more fields on the repeater and changes to the content are not infrequent.

How can this be solved? What's the correct translation setting for each field to replicate the rows in the repeater and the ID, but translate only the label?

May 19, 2023 at 11:11 am #13678665

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Camilo,

Thank you for contacting WPML support!

I understand that the Portuguese translation for the custom fields in the ACF options page reverts to English even though the translations are showing correctly on the front end.

I have created the following sandbox website: hidden link - could you please use that quick login URL to log in and replicate the same setup?

Also, to better understand how to move forward with a solution, please provide me with information about your environment by following these steps: http://wpml.org/faq/provide-debug-information-faster-support/.

Looking forward to hearing back from you.

May 28, 2023 at 7:06 pm #13728413

Camilo

Hi Ahmed, apologies it took me this long to get back to you, but now that I have some time to replicate on the sandbox, it has expired. Can you please set up a new one? I've been playing with the issue and have a lot more insight about it now.

Here I show what's going on:
hidden link

And here are my fields in case you want to test on your end (filename is group_6470202465698.json):

{
    "key": "group_6470202465698",
    "title": "Options - Grenadine",
    "fields": [
        {
            "key": "field_64702025b6810",
            "label": "Client ID",
            "name": "client_id",
            "aria-label": "",
            "type": "text",
            "instructions": "",
            "required": 0,
            "conditional_logic": 0,
            "wrapper": {
                "width": "",
                "class": "",
                "id": ""
            },
            "wpml_cf_preferences": 2,
            "default_value": "",
            "maxlength": "",
            "placeholder": "",
            "prepend": "",
            "append": ""
        },
        {
            "key": "field_64702046b6811",
            "label": "Client Secret",
            "name": "client_secret",
            "aria-label": "",
            "type": "password",
            "instructions": "",
            "required": 0,
            "conditional_logic": 0,
            "wrapper": {
                "width": "",
                "class": "",
                "id": ""
            },
            "wpml_cf_preferences": 1,
            "placeholder": "",
            "prepend": "",
            "append": ""
        },
        {
            "key": "field_64702053b6812",
            "label": "Event ID",
            "name": "event_id",
            "aria-label": "",
            "type": "text",
            "instructions": "",
            "required": 0,
            "conditional_logic": 0,
            "wrapper": {
                "width": "",
                "class": "",
                "id": ""
            },
            "wpml_cf_preferences": 2,
            "default_value": "",
            "maxlength": "",
            "placeholder": "",
            "prepend": "",
            "append": ""
        },
        {
            "key": "field_64702062b6813",
            "label": "Creator\/Speaker Profile Pages",
            "name": "hide_sessions_on_profiles",
            "aria-label": "",
            "type": "true_false",
            "instructions": "",
            "required": 0,
            "conditional_logic": 0,
            "wrapper": {
                "width": "",
                "class": "",
                "id": ""
            },
            "wpml_cf_preferences": 1,
            "message": "Hide sessions on profile pages",
            "default_value": 0,
            "ui": 0,
            "ui_on_text": "",
            "ui_off_text": ""
        },
        {
            "key": "field_6470207fb6814",
            "label": "Filters",
            "name": "filters",
            "aria-label": "",
            "type": "group",
            "instructions": "",
            "required": 0,
            "conditional_logic": 0,
            "wrapper": {
                "width": "",
                "class": "",
                "id": ""
            },
            "wpml_cf_preferences": 1,
            "layout": "block",
            "sub_fields": [
                {
                    "key": "field_6470208ab6815",
                    "label": "Category Filters",
                    "name": "agenda_filters",
                    "aria-label": "",
                    "type": "repeater",
                    "instructions": "",
                    "required": 0,
                    "conditional_logic": 0,
                    "wrapper": {
                        "width": "",
                        "class": "",
                        "id": ""
                    },
                    "wpml_cf_preferences": 1,
                    "layout": "block",
                    "pagination": 0,
                    "min": 0,
                    "max": 0,
                    "collapsed": "",
                    "button_label": "Add Row",
                    "rows_per_page": 20,
                    "sub_fields": [
                        {
                            "key": "field_647020a6b6816",
                            "label": "Filter Name",
                            "name": "filter_name",
                            "aria-label": "",
                            "type": "text",
                            "instructions": "",
                            "required": 0,
                            "conditional_logic": 0,
                            "wrapper": {
                                "width": "",
                                "class": "",
                                "id": ""
                            },
                            "wpml_cf_preferences": 2,
                            "default_value": "",
                            "maxlength": "",
                            "placeholder": "",
                            "prepend": "",
                            "append": "",
                            "parent_repeater": "field_6470208ab6815"
                        },
                        {
                            "key": "field_647020aeb6817",
                            "label": "Categories",
                            "name": "categories",
                            "aria-label": "",
                            "type": "repeater",
                            "instructions": "",
                            "required": 0,
                            "conditional_logic": 0,
                            "wrapper": {
                                "width": "",
                                "class": "",
                                "id": ""
                            },
                            "wpml_cf_preferences": 1,
                            "layout": "table",
                            "pagination": 0,
                            "min": 0,
                            "max": 0,
                            "collapsed": "",
                            "button_label": "Add Row",
                            "rows_per_page": 20,
                            "parent_repeater": "field_6470208ab6815",
                            "sub_fields": [
                                {
                                    "key": "field_647020b9b6818",
                                    "label": "Category ID",
                                    "name": "category_id",
                                    "aria-label": "",
                                    "type": "number",
                                    "instructions": "",
                                    "required": 0,
                                    "conditional_logic": 0,
                                    "wrapper": {
                                        "width": "",
                                        "class": "",
                                        "id": ""
                                    },
                                    "wpml_cf_preferences": 1,
                                    "default_value": "",
                                    "min": "",
                                    "max": "",
                                    "placeholder": "",
                                    "step": "",
                                    "prepend": "",
                                    "append": "",
                                    "parent_repeater": "field_647020aeb6817"
                                },
                                {
                                    "key": "field_647020c6b6819",
                                    "label": "Label",
                                    "name": "label",
                                    "aria-label": "",
                                    "type": "text",
                                    "instructions": "",
                                    "required": 0,
                                    "conditional_logic": 0,
                                    "wrapper": {
                                        "width": "",
                                        "class": "",
                                        "id": ""
                                    },
                                    "wpml_cf_preferences": 2,
                                    "default_value": "",
                                    "maxlength": "",
                                    "placeholder": "",
                                    "prepend": "",
                                    "append": "",
                                    "parent_repeater": "field_647020aeb6817"
                                }
                            ]
                        }
                    ]
                },
                {
                    "key": "field_647020f9b681b",
                    "label": "People Categories",
                    "name": "people_categories",
                    "aria-label": "",
                    "type": "repeater",
                    "instructions": "",
                    "required": 0,
                    "conditional_logic": 0,
                    "wrapper": {
                        "width": "",
                        "class": "",
                        "id": ""
                    },
                    "wpml_cf_preferences": 1,
                    "layout": "table",
                    "pagination": 0,
                    "min": 0,
                    "max": 0,
                    "collapsed": "",
                    "button_label": "Add Row",
                    "rows_per_page": 20,
                    "sub_fields": [
                        {
                            "key": "field_64702110b681d",
                            "label": "Category ID",
                            "name": "category_id",
                            "aria-label": "",
                            "type": "number",
                            "instructions": "",
                            "required": 0,
                            "conditional_logic": 0,
                            "wrapper": {
                                "width": "30",
                                "class": "",
                                "id": ""
                            },
                            "wpml_cf_preferences": 1,
                            "default_value": "",
                            "min": "",
                            "max": "",
                            "placeholder": "",
                            "step": "",
                            "prepend": "",
                            "append": "",
                            "parent_repeater": "field_647020f9b681b"
                        },
                        {
                            "key": "field_6470211cb681e",
                            "label": "Label",
                            "name": "label",
                            "aria-label": "",
                            "type": "text",
                            "instructions": "",
                            "required": 0,
                            "conditional_logic": 0,
                            "wrapper": {
                                "width": "70",
                                "class": "",
                                "id": ""
                            },
                            "wpml_cf_preferences": 2,
                            "default_value": "",
                            "maxlength": "",
                            "placeholder": "",
                            "prepend": "",
                            "append": "",
                            "parent_repeater": "field_647020f9b681b"
                        }
                    ]
                }
            ]
        },
        {
            "key": "field_6473980ab4ea3",
            "label": "Tags",
            "name": "tags",
            "aria-label": "",
            "type": "group",
            "instructions": "",
            "required": 0,
            "conditional_logic": 0,
            "wrapper": {
                "width": "",
                "class": "",
                "id": ""
            },
            "wpml_cf_preferences": 0,
            "layout": "block",
            "sub_fields": [
                {
                    "key": "field_6473981ab4ea4",
                    "label": "Tags Label",
                    "name": "tags_label",
                    "aria-label": "",
                    "type": "text",
                    "instructions": "",
                    "required": 0,
                    "conditional_logic": 0,
                    "wrapper": {
                        "width": "",
                        "class": "",
                        "id": ""
                    },
                    "wpml_cf_preferences": 0,
                    "default_value": "",
                    "maxlength": "",
                    "placeholder": "",
                    "prepend": "",
                    "append": ""
                },
                {
                    "key": "field_64739821b4ea5",
                    "label": "Tags",
                    "name": "tags",
                    "aria-label": "",
                    "type": "repeater",
                    "instructions": "",
                    "required": 0,
                    "conditional_logic": 0,
                    "wrapper": {
                        "width": "",
                        "class": "",
                        "id": ""
                    },
                    "wpml_cf_preferences": 0,
                    "layout": "table",
                    "pagination": 0,
                    "min": 0,
                    "max": 0,
                    "collapsed": "",
                    "button_label": "Add Row",
                    "rows_per_page": 20,
                    "sub_fields": [
                        {
                            "key": "field_64739829b4ea6",
                            "label": "ID",
                            "name": "id",
                            "aria-label": "",
                            "type": "number",
                            "instructions": "",
                            "required": 0,
                            "conditional_logic": 0,
                            "wrapper": {
                                "width": "",
                                "class": "",
                                "id": ""
                            },
                            "wpml_cf_preferences": 0,
                            "default_value": "",
                            "min": "",
                            "max": "",
                            "placeholder": "",
                            "step": "",
                            "prepend": "",
                            "append": "",
                            "parent_repeater": "field_64739821b4ea5"
                        },
                        {
                            "key": "field_64739832b4ea7",
                            "label": "Name",
                            "name": "name",
                            "aria-label": "",
                            "type": "text",
                            "instructions": "",
                            "required": 0,
                            "conditional_logic": 0,
                            "wrapper": {
                                "width": "",
                                "class": "",
                                "id": ""
                            },
                            "wpml_cf_preferences": 0,
                            "default_value": "",
                            "maxlength": "",
                            "placeholder": "",
                            "prepend": "",
                            "append": "",
                            "parent_repeater": "field_64739821b4ea5"
                        }
                    ]
                }
            ]
        }
    ],
    "location": [
        [
            {
                "param": "options_page",
                "operator": "==",
                "value": "acf-options-grenadine"
            }
        ]
    ],
    "menu_order": 0,
    "position": "normal",
    "style": "default",
    "label_placement": "top",
    "instruction_placement": "label",
    "hide_on_screen": "",
    "active": true,
    "description": "",
    "show_in_rest": 0,
    "acfml_field_group_mode": "translation",
    "modified": 1685297218
}
May 28, 2023 at 7:32 pm #13728451

Camilo

I see this thread where the user seems to have had the same issue, but no clue on it was solved:
https://wpml.org/forums/topic/wpml-and-acf-repeater-field-within-options-page/

May 29, 2023 at 11:03 am #13731471

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Camilo,

Thank you a lot for the explanation video.

I've set the translation this way:

- ACF Group: Expert
- Group: Copy
- Repeater: Copy
- Number: Copy
- Text: Translate

Could you please set the Group to copy-once and check if the issue is still there?

The reason I'm asking you to do this is that I found a bug report similar to what you're describing here, and our devs are working on it.

If the issue does not get resolved after that change, I created a new sandbox here: hidden link - please use that quick login URL to replicate the issue.

Looking forward to hearing back from you.

May 29, 2023 at 7:14 pm #13735003

Camilo

Hi Ahmed,

This would be a workaround, but it's also not ideal since I could easily add multiple items to the repeater field in the original language, and then would have to also manually add each entry to the repeater field on the translation.

Since I've set the repeater to "Copy" I would expect that it will keep the same number of fields, but it doesn't, seems as if I had set the repeater to "Translate" as translations are independent from the original language.

You can check the sandbox and see what I mean, where I have 4 entries in EN and only 2 in ES: hidden link

Is there a way to use the ATE on these options page? That would probably work great since it would only pull the text from fields that actually need translation, but I haven't found a way to use ATE on custom ACF options pages.

Thanks.

May 30, 2023 at 9:51 am #13738103

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Camilo,

This would be a workaround, but it's also not ideal since I could easily add multiple items to the repeater field in the original language, and then would have to also manually add each entry to the repeater field on the translation.

I understand your concerns, and I confirm this is a workaround until our devs fix the bug.

Is there a way to use the ATE on these options page?

Unfortunately, not. This is the way to translate the ACF Options page fields as explained here: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/translating-the-acf-options-page-custom-fields-with-wpml/.