Opened 4 years ago
Last modified 4 years ago
#51158 new defect (bug)
With ACF Blocks in 5.5, "enqueue_assets" causes fatal error
Reported by: | bronsonoquinn | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | blocker | Version: | 5.5 |
Component: | Editor | Keywords: | 2nd-opinion needs-patch reporter-feedback |
Focuses: | Cc: |
Description (last modified by )
This is related to ACF Pro, but didn't happen until the upgrade to WP 5.5. I downgraded to 5.4.2 to make sure and I can verify it's a WordPress issue, likely related to REACT or the Rest API. I don't know enough about the Gutenberg editor to know if it's specific to that, so I'm posting here with "second-opinion" Workflow Keyword.
I have several custom blocks created using ACF Pro. One of them requires multiple javascript files and uses the "enqueue_assets" attribute to enqueue them.
When I try to edit any post, I get a popup error that covers the entire screen saying "The editor has encountered an unexpected error." and has 3 buttons: "Attempt Recovery", "Copy Post Text", "Copy Error". None of the buttons work.
In the console, I get these errors:
react-dom.min.js?ver=16.9.0:103 TypeError: First argument must be a String, HTMLElement, HTMLCollection, or NodeList at t.exports (compose.min.js?ver=c4775e2aa9288586791e26a980eff851:9) at e.value (compose.min.js?ver=c4775e2aa9288586791e26a980eff851:9) at new e (compose.min.js?ver=c4775e2aa9288586791e26a980eff851:9) at compose.min.js?ver=c4775e2aa9288586791e26a980eff851:9 at Vb (react-dom.min.js?ver=16.9.0:104) at Xi (react-dom.min.js?ver=16.9.0:151) at unstable_runWithPriority (react.min.js?ver=16.9.0:26) at Ma (react-dom.min.js?ver=16.9.0:52) at Yb (react-dom.min.js?ver=16.9.0:150) at O (react-dom.min.js?ver=16.9.0:120) components-1480.js:24 Uncaught TypeError: Cannot read property 'clientHeight' of null at G.hasOverflowedContent (components-1480.js:24) at G.fitTitle (components-1480.js:24) at components-1480.js:24
After the second error, the first error repeats and keeps getting hit every few milliseconds, telling me it has thousands of times within a minute.
I'll post this with ACF Pro, too, but wanted to mention here in case it's a WordPress bug. I don't know how many people use ACF blocks in the Block Editor, but it completely prevents people from editing posts if they have some.
Thanks!
error screenshot