Skip to content Skip to sidebar

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, 3 months ago.

Assisted by: Osama Mersal.

Author Posts
April 16, 2024 at 5:04 pm #15527369

amyS-4

Thanks. I also want to mention again. If you switch it back to seamless and disable the ACRML plugin the fields will work as they should.

April 17, 2024 at 8:33 am #15530166

Osama Mersal
WPML Supporter since 02/2020

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

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

Hi,

Thanks for your update. I passed this info to our 2nd tier support team.

Best regards,
Osama

April 17, 2024 at 1:56 pm #15532777

Osama Mersal
WPML Supporter since 02/2020

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

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

Hi,

Our 2nd tier support team fixed the issue by editing: hidden link (Group = Content Type: Button Group — To Clone)
and there, they changed the repeater field name to "button_group_repeater"

This is because there was a collision between the field names being the same "button_group," and this was creating the problem.

The downside of this is the loss of content - you have to re-create the links in the button groups or rename the meta keys to the proper value - e.g. from "content_blocks_8_button_group_0_custom_url" to "content_blocks_8_button_group_repeater_0_custom_url"

I tested this approach on my local server, and it fixed the issue.

Best regards,
Osama

image.png
April 17, 2024 at 6:06 pm #15534449

amyS-4

I appreciate the reply. and for finding a potential solution.

The trouble with this is that I have to go through ALL pages where there were button groups are used and recreate them. While I can potentially so a search/replace, it's tricky and kind of risky.

Can you confirm that your tier 2 team made the field name change on my server? I do not see the change there. the repeater is still called "button_group". I tried manually changing it on my end and doing a search/replace for "_button_group_" to "_button_group_repeater_". Not having luck. I am probably going to clone the live server and try again.

Can you help me understand why this is all of a sudden an issue and was not before?

thanks.

April 17, 2024 at 11:10 pm #15535099

amyS-4

also can you clarify where the conflict with "button_group" was. I can't find the other one that may be causing the issue.

April 18, 2024 at 2:38 am #15535245

amyS-4

Hey Osama... I've reverted back to the previous backup a few times and tried to execute this with no luck.

Are you sure your direction is right. If I'm changing Content Type: Button Group — To Clone

that is different than 'Global Content Blocks" which is what your direction to change the meta keys to the proper value - e.g. from "content_blocks_8_button_group_0_custom_url" to "content_blocks_8_button_group_repeater_0_custom_url"

shouldn't I be changing from:
"content_blocks_1_column_1_content_types_0_button_group_0_button_text" to "content_blocks_1_column_1_content_types_0_button_group_repeater_0_button_text"

I've tried both and not having luck. I'm not 100% sure this direction is right. Can you please double check.

I also noted that on the KIDS page ( hidden link ) the "Featured Databases" Multicolumn flexible content field is also missing after any updates are made to the ACF fields.

With the solution you suggested above, why would the issue go away if I disable the ACFML plugin? It make me wonder if the solution is correct.

Thank you

April 18, 2024 at 4:04 am #15535294

amyS-4

I'm totally confusing myself a bit now. Sorry!!! I developed this so long ago I'm having trouble trying to remember some of the logic.

So if I did a search and replace in the database for "_button_group_" to "_button_group_repeater_"

that will also change
"content_blocks_1_column_1_content_types_0_button_group_0_button_text" to "content_blocks_1_column_1_content_types_0_button_group_repeater_0_button_text"

which will cover the clone of Button Group in "Global Content Types — To Clone".

After the search/replace, I reload the homepage and the buttons are there, but the back end the fields are all blank. See screenshot.

in MYSQL I see the data is still there but the fields are not connecting to it. (see other screenshot)

I'm kinda lost here. I'm going to restore back to the backup again and let you test this again. Thanks

Screenshot 2024-04-17 at 10.03.14 PM.png
Screenshot 2024-04-17 at 9.59.08 PM.png
April 18, 2024 at 9:23 am #15536571

Osama Mersal
WPML Supporter since 02/2020

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

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

Hi,

I tested the workaround on a local version of your site, and the solution works correctly, but it deletes the buttons from the front end and backend, so you need to re-add them.

Also, our 2nd tier supporter tested that before sharing the workaround with me.

The issue with ACFML is the structure of the fields and clones, which is a bit complicated.

If you disable ACFML, the issue will not occur in the default language, but you will not be able to translate the fields correctly.

The access details are denied when trying to log in to the site to try the workaround. I think this is because you retrieved an old backup.

Best regards,
Osama

April 19, 2024 at 2:12 pm #15544203

Osama Mersal
WPML Supporter since 02/2020

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

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

Hi,

Thanks for the access details. I edited the home page without any changes to check the button group and kept the page open.

After that, I edited this field group and changed the button group field name. (hidden link)

The last step was updating the home page in the opened tab after changing the text in the first button. Please check if the home page works correctly. (hidden link)

Best regards,
Osama

2024-04-19_16-11-22.jpg
April 19, 2024 at 2:18 pm #15544238

amyS-4

Thank you Osama. I’ll will review shortly. Just getting online for the day. Making some coffee 🙂

I appreciate the additional help here. Did you see in one of my messages above that I am having the same issue on the /kids page with the multicolumn flexibile content block. Can you look into that as well.

Thank you.

April 19, 2024 at 2:35 pm #15544283

Osama Mersal
WPML Supporter since 02/2020

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

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

Hi,

Enjoy your coffee! I did the same steps. I edited the Kids page without any changes to check the button group and kept the page open.

After that, I changed the content field name in this field group. (hidden link)

Please check if the Kids page works correctly. (hidden link)

Best regards,
Osama

2024-04-19_16-26-09.jpg
April 19, 2024 at 2:53 pm #15544434

amyS-4

Hey Osama, Thank you. Can I ask.... Are you doing this on my staging server or on your local server?

I went in opened and simply saved the "Global Content Blocks" page
hidden link

In doing so the button group on the homepage disappears as it did previously. I just want to confirm that you're maybe working locally.

Separately, I wonder how leaving the page open, changing a field name and saving the open page would work. Wouldn't the field name change on the page? Just trying to understand how that works.

thank you again!

April 19, 2024 at 4:03 pm #15544652

Osama Mersal
WPML Supporter since 02/2020

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

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

Hi,

1) I did the steps on your site.

2) Leaving the page open is for not adding the buttons from scratch.

3) Although I followed the steps on my local site, I can see the issue on your site. Therefore, I'll consult our second-tier support team about this.

4) When I changed the buttons, I didn't update the "Global Content Blocks" group, so it worked correctly.

Best regards,
Osama

April 19, 2024 at 4:58 pm #15544738

amyS-4

Thanks Osama. Let me know if you'd like me to revert again as it may prove helpful to start from where the live site Is and find a solution that work. Appreciate you elevating this to Tier 2.

April 21, 2024 at 9:10 am #15546831

Osama Mersal
WPML Supporter since 02/2020

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

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

Hi,

Sorry for the late reply. Please don't restore the site, so our 2nd tier can check the issue on the current status.

If they ask me to restore the site, I'll let you know.

Best regards,
Osama