[Resolved] ACFML2 Causing issues with some cloned fields
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.
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.
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?
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.
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
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.
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)
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.
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.
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.
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
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.