This issue seems to be happening because the REST API endpoint preloading is somehow satisfying the enqueues, meaning they don’t happen to the block editor itself.
As a quick fix, something like this will work:
[Removed – see updated code further down]
But this might be a bit of a sledgehammer approach to solving the issue, but I wanted to get something over to you as soon as possible for those who wanted to stick on WP5.9.1
We’ll keep digging into this though, and give a further update shortly.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We've just released ACF 5.12.3 with a security fix to prevent arbitrary file uploads to forms with ACF fields.— Advanced Custom Fields (@wp_acf) July 14, 2022
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.