Toggle Layout Not Working?
-
Latest everything; default theme.
When clicking the “toggle layout”, the layout will change to transparent. When saving the page, the status gets reverted, as if you didn’t click “toggle layout” at all.
-
Hello,
Thanks for the feedback!
I just ran some test, and it works fine on my end. Here is the video of my test.
Can you try to setup a simple test like I did in my video, see if you get the same result? Here the my?Field Group Json Export. You can save that json into a file, and import it from the “ACF > Tools” admin menu.
The Field Group is called “Flexible Content” and will be displayed on any Post Type: Page in your WP Admin.
If the issue is still there, then it probably means there is some custom code/hook which break the feature, either in a plugin or in your theme.
In order to isolate the issue, I would recommend clone your website on a development / staging environment using Duplicator, or with your hosting backup solution. Then try to disable all your plugins one-by-one (at the exception of ACF Pro & ACF Extended) until you find which one cause the issue.
If the problem persists, try switch to the native WP Twenty Twenty Two theme, to make sure you don’t have any custom code in your theme which would break the feature.
In all cases you should be able to confirm it works like I did, by setting up a clean WP install with ACF Pro + ACF Extended only.
You can read more about how to setup a favorable environment for debugging WordPress & ACF in our guide here.
Let me know if you found something!
Thanks!
Regards.
I found the issue. It is because I am using Local JSON in ACF. I discovered this my clearing out the folder and it started to work. After regenerating them, I see that enabling the “Toggle Layout” in the “Additional Actions” does not trigger an update the acf-json.
- This reply was modified 2 months, 3 weeks ago by bravotangodev.
A new finding as well is that not only does it not trigger an update, it’s specifically omitted from the acf-json, meaning, it will always be removed. There’s no way to use Local JSON and this setting within ACFE.
- This reply was modified 2 months, 3 weeks ago by bravotangodev.
Hello,
Thanks for the details!
The “Toggle Layout” is a feature added by ACF Extended, and it should update the local JSON when enabled or disabled from the ACF UI. I just ran some tests, and it works in my end. Here is the video of my test.
Can you try to create a new “Test Field Group” with a “Test Flexible Content”, enable the Json Sync, and try to enable/disable the setting, see if it updates the Json file like I did in my test video? You should get the same result.
Please note this setting should not add the sub field
acfe_flexible_toggle
in your layouts, as you shared in your screenshot, on the right side here: https://imgur.com/kOnEi63If you see these sub fields in your ACF UI, you should remove them. Do you have any idea how these were generated?
Note that the Force Sync feature (which is a PRO feature, see documentation) had a bug which generated these sub fields. This was fixed in 0.9.0.6 (see changelog). If you’re using ACF Extended Pro and the Force Sync feature, please open a ticket from your Account Dashboard, so we can check it out (I cannot provide support for Pro features here).
Let me know if you found something.
Thanks!
Regards.
The
acfe_flexible_toggle
sub field was added automatically is my best guess – it wasn’t done manually if that is what you are implying. I am not using ACFE Pro. Maybe this was a leftover from a previous version? Not sure.I think this was just a red herring though, I can see, when using a new layout, it is adding/removing the
"toggle"
as toacfe_flexible_add_actions
as expected; however, the toggle is still not working.
Disabling acf-json is still causing it to work normally. Example: https://dev.bravotango.ca/tests/acfe/toggle.mp4
I tested this previously with the default theme and no other plugins. The default theme worked until I started using Local JSON.Hello,
Thanks for the details, and the video demo.
I tested the simple scenario in your video on a blank WP install, and I cannot reproduce the issue. Here is the video of my test.
Are you sure that you correctly tested it with all plugins disabled (including must-use plugins), and with the native Twenty Twenty Four theme only?
If the issue persists, can you try to setup a clean WP install, and reproduce this simple scenario? It should work as in my test video.
Here are the specs of my test WP install:
- WP 6.6.1
- ACF Pro 6.3.6
- ACF Extended 0.9.0.7
- Theme: Twenty Twenty Four
Thanks!
Regards.
Hello,
Any news about this issue? Did you manage to check the feature?
Thanks!
Regards.
- You must be logged in to reply to this topic.