-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to overwrite prefix or namespace for ACF blocks #284
Comments
It's possible using FWIW, you would always have to repair/re-insert your existing blocks when changing the prefix. |
I was looking into this. ACF Pro hardcodes the namespace to From the
After the block array is passed through that function, it's passed through the
Edit: This is true as of the latest ACF Pro version, 6.3.11. |
Thanks for looking into this @thunderdw I think it might be sane to just deprecate being able to configure this in future versions. Is there ever really a purpose in customizing the namespace outside of some sort of extra customization? Otherwise, I'm open to a PR for a clean implementation of the workaround if others insist on having this. |
This would now be a possible change to implement as of #311 with ACF Composer having it's own way to register ACF blocks with PHP– but it might catch someone off guard if they are customizing the namespace as-is since ACF currently converts |
When I generated a new block called Hero and I tried to overwrite the prefix from
acf/
tocustom/
for example. Problem was that it still rendered withacf/
prefix in the Gutenberg editor. So all my fields were missing from the block. But, when I cached the block.json usingwp acorn acf:cache
, then it had the correct prefix. But problem with caching was that I had to add re-insert the block for it to work again. Since it showed thatacf/hero
block was missing. Same problem goes overwriting the namespace.The text was updated successfully, but these errors were encountered: