Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue where a 'Button Group' flexible content block is not displaying on the homepage after cloning their live site to a staging environment. This issue occurred after upgrading to ACFML2 and making changes to ACF field groups. The problem persists despite trying various settings, and the block reappears only when the ACFML plugin is disabled.

Solution:
We recommend the following steps:
1. Create a fresh staging site from the live site.
2. Update WordPress Core, WPML CMS, String Translation, ACF, and ACFML to the latest versions, specifically ACFML (2.1.0).
3. Change the button field name to

button_group_repeater

.
4. Keep the clone field as Seamless.
5. Check if the issue is resolved.

Please note that the solution provided might be outdated or not applicable to your case. If the issue persists, 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. If necessary, do not hesitate to open a new support ticket for further assistance 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: 

This topic contains 55 replies, has 2 voices.

Last updated by Osama Mersal 1 year, 1 month ago.

Assisted by: Osama Mersal.

Author Posts
April 12, 2024 at 9:42 pm #15514188

amyS-4

We have a flexible content field that pulls in cloned fields for various design options. This site has been up for years and working great. Our client upgraded to ACFML2 at some point. But we have not edited or touched any ACF field groups since then.

I was in the site to do some work. I cloned the live site to our staging environment and when I made some random changes to field groups... one of or flexible content blocks on the homepage (Button Group). is now empty. I have tried numerous setting changes to get it to show up again. All other flexible content blocks are appearing as normal. Only this one block type stops working.

The parent field group is Global Content Blocks -- which contains various flexible content blocks that pulls in cloned fields.
the "Button Group" flexible content block option pulls in a cloned field group called "Block: Button group" which has a group of settings and pulls in a cloned field of content type for how button groups work. And then it pulls in a cloned field for the button element.

Again... This has always worked great and with automatic translation enabled. But now that field is blank on staging and I can't get it back.

I've cloned a fresh copy of our site from LIVE to Staging multiple times and the same thing results. The Button Group block added to our homepage is empty in the admin and the block on the front end stops showing up. But all other flexible content fields with cloned fields all seem to work fine.

EXPERT mode seems to be the mode that closest represents what the previous version of ACFML use to work. I tried that, and also "same fields across all translations" which technically we would want. Seems like Different fields across all translations would not be ideal as it sounds like it would not allow for automatic translations. I've tried all these settings.

I should mention that if I disable the ACFML plugin, the fields re-appear on the backend and the frontend.

Any advice on how to fix this? I provided debug info on a fresh copy before the issue is seen. I can provide staging login information if needed. Appreciate any help.

Screenshot 2024-04-12 at 3.38.00 PM.png
Screenshot 2024-04-12 at 3.40.07 PM.png
April 14, 2024 at 12:02 pm #15515651

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

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

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

Could you please share a screen-recorded video while reproducing the issue?

Also, I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
Preferably to a test site where the problem has been replicated.

Your answer will be private, meaning only you and I can access it.

❌ Please backup your database and website ❌

✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama

April 15, 2024 at 2:46 am #15516910

amyS-4

Thank you for the help. I recorded this LOOM for you to see the issue:
hidden link

I also created access to our staging environment.
[Access Details Deleted]

admin:
hidden link

homepage
hidden link

Homepage admin:
hidden link

ACF global content block fields:
hidden link
This pulls in the next cloned field:

Block: Button Group — To Clone
hidden link
This pulls in the next cloned field:

Content Type: Button Group — To Clone
hidden link
This pulls in the next cloned field:

Component: Button — To Clone
hidden link

You'll see that the cloned fields groups are all still asking for a translation setting. Also interestingly... ALL other flexible content blocks still work fine after saving. Only this "Block: Button Group" seems to have an issue.

Again this all worked fine but recent stopped working. We have only English and then a spanish translation. The fields on the English and spanish site should pretty much always be the same fields just translated. The layout and fields order should always be the same for both.

You can modify and disable anything you like in this build. I can restore from the live server and push my file changes again easily.

Any help is appreciated.

April 15, 2024 at 8:29 am #15517823

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

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

Hi,

1) I've deleted the access details. If you don't see the form below, please don't add your credentials, as they will be publicly exposed٫ (hidden link)

2) Please try the workaround mentioned on this page. (https://wpml.org/errata/acf-block-clone-field-value-lost-when-same-block-added-twice-in-a-post/)

Best regards,
Osama

April 15, 2024 at 3:55 pm #15521272

amyS-4

HI Osama, I'm confused... you asked me to provide login information and I checked off on my end that the reply was "SENT PRIVATELY" so how were the credentials exposed? Should I change the password?

I have actually already tried that suggestion. when I choose GROUP for the display settings, the fields appear in the admin, but no data is saved when entering and updating the page. Furthermore that's the only "Button Group" on the page. So it's not a duplicate like the solution page mentions.

I'd appreciate if you'd log in and do research as to why this is happening all of sudden. Again everything was working great on this site until ACFML was updated.

Thanks.

April 15, 2024 at 4:15 pm #15521323

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

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

Hi,

There is a private field where you can share the access details. Please check this screenshot. (hidden link)

I rechecked your video and noticed that some field groups don't have translation mode, which could be the cause of the issue. Please try the following steps:

1- Edit the home page in the default language on the version that works correctly and keep this tab open
2- Go to ACF-> Field groups and make sure that every field group has a translation mode and save it
3- On a new tab, edit the home page; you should see that the buttons are deleted
4- Re-save the home page from the first step and check if that workaround fixed the issue

Best regards,
Osama

April 15, 2024 at 4:33 pm #15521400

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

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

Hi,

Thanks for the access details. According to your needs, I suggest "Same Fields Across Languages".

Please check this guide to know more about each translation mode. (https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#how-to-translate-acf-fields)

Best regards,
Osama

April 15, 2024 at 4:49 pm #15521414

amyS-4

Thanks. Can you confirm if that would be right even if only some fields should be translated. Some fields are URLS, checkboxes, images or other elements tat should remain the same.

April 15, 2024 at 4:56 pm #15521422

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

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

Hi,

Here are the translation preferences for the fields in each mode. (https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/)

Best regards,
Osama

April 15, 2024 at 8:25 pm #15521884

amyS-4

Hi Osama,
I went through the process you suggested. I went through all field groups that were not already EXPERT (by default) and saved them as SAME FIELDS ACROSS ALL LANGUAGES. When I did that and reloaded the homepage edit screen on a new tab, the button group field flexible content field was still populated. I saved the page and it was still there.

I then went to the "Global Content Blocks" field which was EXPERT by default and simply saved the page. I reloaded the homepage edit screen an and the Button group field was empty. Note not just empty meaning the data was gone but any interface to add content is gone. I went back to the other tab with the homepage and saved it however the Botton group flexible content field was still blank.

It seems that the "Global Content Blocks" ACF field is somehow the issue here. It's not building that field properly. but all other flexible content fields are fine.

In resetting the database your support user in my system got deleted. I'll need to recreate it however I did not save the password. I'll need to create a new one and send it to you if needed.

April 15, 2024 at 8:49 pm #15521929

amyS-4

Also, separately... I was trying to link up the staging site to WPML and they copy Migration code button does not work. Nothing is copied to the clipboard for me to paste on the staging server.

Screenshot 2024-04-15 at 2.48.02 PM.png
April 16, 2024 at 9:42 am #15523857

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

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

Hi,

1) So editing the "Global Content Blocks" field group causes the issue. I'd like to check it, so please share the access details to check it.

I'll try to add the buttons and check why they are not added when this field group translation preference is changed.

2) We try to keep one issue per ticket in our forum. May I kindly ask you to open a new ticket for your additional question?

Continuing with one ticket per issue helps supporters focus on one issue at once and enables other users to find solutions to their questions faster.
Therefore, I've split the other issue and created a new ticket with this issue.

Best regards,
Osama

April 16, 2024 at 4:33 pm #15527266

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

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

Hi,

Thanks for the access details. I selected "Group (displays selected fields in a group within this field)" in the button group clone.

After that, the button appeared correctly on the home page. (Kindly check the attached screenshot)

Best regards,
Osama

2024-04-16_18-29-27.jpg
April 16, 2024 at 4:40 pm #15527289

amyS-4

Thanks for the quick reply. Yes, I already tried that. If you note my comment in any earlier reply, the fields do not save and the buttons are still not appearing in the front end. Thank you.

April 16, 2024 at 4:58 pm #15527362

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

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

Hi,

Thanks for your reply. I tested the issue on a newly created page and faced the same issue.

I'll consult our 2nd tier support team about this issue and update you as soon as I get their reply.

Best regards,
Osama