A recent update (I don’t know which) has made the EDIT / Preview button disappear across all my dozens of sites that use ACF Blocks.
Here’s an example of a typical block.json file that I use:
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "acf/map",
"title": "Portfolio Map",
"description": "A map with hundreds of data fields.",
"version": "1.0.0",
"viewStyle": ["file:./map.css"],
"editorStyle": ["file:./map.css"],
"icon": "admin-site",
"category": "mysite-blocks",
"keywords": ["map", "usa", "portfolio", "properties"],
"acf": {
"mode": "edit",
"renderTemplate": "map.php"
},
"supports": {
"customClassName": true,
"anchor": true,
"align": false,
"multiple": false,
"mode": true,
"jsx": false
}
}
As you can see supports.mode is true, but it no longer works. I don’t have the option to edit my block and it’s stuck in preview mode for me with no way to switch back.
What’s changed in ACF? And is there a fix? Or am I just doing something wrong?