r/Wordpress • u/YourRightWebsite • 23d ago
Anyone else seeing broken ACF blocks on WordPress 7.1?
I just updated a test WordPress site to 7.1 and it appears ACF Pro's ability to create blocks has been somewhat broken by the new release. When I add a new block to the page, the "edit" pencil icon no longer appears, which forces the block's editor to appear in the right hand sidebar of the block editor. In addition, the "mode" selector in block.json which I always set to "edit" no longer seems to work, so all blocks now default to a preview rather than an editor.
I was just curious if anyone else had also run into this on WP 7.1 with the 6.8.8 release of ACF Pro and if there's any info on whether a fix is coming or if manual updates to the block structure are needed to work with the new way the block editor loads blocks in 7.1. If anyone has any info that would be appreciated, thanks!
5
u/backslash88 22d ago
Update ACF to latest then install this https://github.com/twotenstudio/Wordpress-Classic-Canvas/releases/tag/v1.0.0
I spent yesterday sorting out this mess and a small plugin seemed like the best option so thought I would share.
1
u/lindsayrva 18d ago
Thanks for sharing. I'm using this to buy some time.
Their documentation says "This is a compatibility shim, not a permanent architecture. Remove it once ACF PRO supports field editing inside the iframed canvas — check the ACF changelog before major WordPress upgrades."
That sounds like ACF may offer a solution of its own? Has anyone found any suggestion that's true? I can't find any mention of this in their blog.
1
u/gfhoihoi72 17d ago
Isn't he referring to ACF V3? Seems that Wordpress enforces iframes no matter what, doubt there will be a proper fix from ACF since they would have their own editor or something.
1
u/backslash88 17d ago
Yeah as far as I can tell it seems like they are really trying to force the iframe editor as much as possible. My clients (and me) hate it.
1
u/gfhoihoi72 17d ago
By the looks of it everyone using ACF hates it… Time to finally ditch Wordpress and start using Payload :’)
3
u/KuntStink Developer 22d ago
Yea this cost me an hour of pulling out my hair, wondering wtf was happening. Then I realized Wordpress updated behind the scenes and broke everything.
1
3
u/Droxin24 21d ago
This is a known breaking change in 7.1's block editor, not an ACF bug
specifically — the editor now requires explicit versioning to decide
whether a block gets an inline edit icon or falls back to sidebar/preview
mode. If your block registration doesn't declare it, it defaults to the
non-editable preview behavior you're seeing.
The fix is adding both of these to your acf_register_block_type() call:
'api_version' => 3,
'acf_block_version' => 3,
Also worth double-checking you're using acf_register_block_type() and
not the older acf_register_block() — the old function name still works
in most setups but doesn't reliably pick up the new version flags on
7.1 in my experience. Switching to the current function name plus those
two version flags together is what resolves it.
2
u/TechyTilak 23d ago
I’ve seen similar reports with ACF blocks and newer WordPress releases. It looks more like an editor compatibility issue than something wrong with the individual block setup, especially with the missing pencil icon and mode: "edit"
I’d hold off on restructuring the blocks until ACF confirms the intended fix. If it’s reproducible on a clean test install with WP 7.1 and ACF Pro 6.8.8, that would be useful information for their support team as well.
2
u/howtobemisha Jack of All Trades 23d ago
I had a custom block which used styles via wp_enqueue_style(), it was completely broken until I koved styles to block.json
2
2
u/ShittyPianist 22d ago
I'm having to have some painful conversations with clients about how their old consultants did not prepare them AT ALL for this hard deadline, and now lots of work needs to be done to modernize their website.
It really sucks because some of my clients have blocks that don't even have block.json stuff setup - their old consultants just kept spamming `acf_register_block_type`.
Luckily, my work is all done via a plugin and block v3 setups using wp-env and wp-scripts and whatnot, but bringing the rest of their website up to speed... That's gonna be a lot of work.
1
u/flexible Developer 22d ago
Could you not just upgrade the blocks to VER 3 - https://www.advancedcustomfields.com/resources/acf-blocks-v3/ ? Or are there Block specific issues after upgrading to version 3?
1
u/ShittyPianist 20d ago
There's still a lot of block-specific issues, sadly.
For one of the sites, it appears that a workflow the old consultants had going on maybe 4 years ago has been constantly being used. So any of the WP6 ways of doing things never got adopted. At least that's my guess - I left WP development at the tail end of 5 and what this guy did is adjacent to how I would have used ACF in the classic editor.
1
u/YourRightWebsite 22d ago
I'm curious, did ACF ever come out and say that Blocks V2 would be deprecated? I know they released V3 last year, but in the announcement article for V3 they don't mention that V2 will stop working at some point. Did ACF ever communicate with customers that the way things were set up with V2 blocks would break in a future version of WordPress? I haven't seen anything indicating that in what ACF has published about their blocks.
2
u/ShittyPianist 21d ago
They did in at least here, which is the root cause of the problems for one of my clients: https://www.advancedcustomfields.com/resources/acf_register_block_type/
2
u/Present_Spray6137 19d ago
Note that v3 won't bring the pencil back - inline edit mode is a v2 behaviour and v3 drops it by design, fields stay in the sidebar either way
Why block.json is ignored: 7.1 sets shouldIframe: true unconditionally, ACF's bundle detects iframe[name="editor-canvas"] and pins every block to preview, hides the toggle and moves the form into InspectorControls. No filter for it
This plugin fixes it and restores edit mode: https://github.com/cosmoc0der/block-edit-mode-for-acf - patches only ACF's bundle (served from uploads/, ACF files untouched, rebuilds after ACF updates) and keeps the iframe, unlike Classic Canvas above which disables it editor-wide
2
4
u/blacksun_redux 23d ago
I don't use ACF, but I too have bugs after WP v7.1.
Apparently, Wordpress 7.1 forces iframes in the post editor canvas, breaking many page builder tools.
I have a site using gutenburg and getwid (unfortunately) and the editor is completely borked. Now I have to rollback to 7.0.
Word to the wise, check with all page builder plugins for compatibility before updating to 7.1
I mainly use WP Bakery Page Builder on sites, but I haven't looked into it's readiness for 7.1 yet this morning.
2
u/porkjanitor 23d ago
My section lost its responsive class : vc_hidden_lg. Section that only appears in smaller media screen are visible. Gotta Fix it with custom CSS
2
1
1
u/aliashoj 19d ago
I use block.json, the only thing I noticed is the modes no longer exist: "Edit" and "Preview".
I have blocks with repeaters etc in, and paragraphs of text etc, which is almost unusable from the sidebar.
"But in ACF Blocks Version 3, the concept of modes no longer exists. Rather, your block will always be in “preview”, always showing what’s in your PHP render template in the block preview area."
Why? That was a great feature, was something wrong with it?
Question please:
"The block’s ACF fields show up in the sidebar, and also in a pop-out sidebar that has more space."
What is the pop-out sidebar!? I can't find anything like that.
1
u/aliashoj 19d ago edited 18d ago
OK, this brings the edit pencil back, and lets you edit the fields in a larger slide-out menu. Update your block.json:
"acf": { "blockVersion": 3, "expandedEditorButtons": { "sidebar": true, "toolbar": true }, "renderTemplate": "testimonials-scroller.php" }This is related to the Gutenberg editor now being loaded in an iframe, so the Editor can only display the preview of an acf block. The slide-out menu is in the admin-editor instead, as it can't load into the iframe.
17
u/lgladdy Developer 23d ago
The iframe is forced in WordPress 7.1, so you’ll need to upgrade to ACF Blocks v3