-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Custom Fields option displays when ACF is enabled #11386
Comments
Hi @noisysocks Can you attach some screenshots of the issue so I can replicate it on my end? Could you also elaborate a little more about the following?
|
Tested and confirmed using WordPress 4.9.8 and Gutenberg Note: I did not see the same problem when testing with WordPress 4.9.8 and Gutenberg 4.2.0-rc.1 and Advanced Custom Fields 5.7.7. |
Thanks for the screenshots - very clear. Yes, we provide a setting to remove the "Default custom fields metabox" like so: It will be important to note that we run this code during the "add_meta_boxes" action with a priority of 10. Perhaps this is "after" WP has localized data for Gutenberg? |
The more accurate test would be for
Core and |
This won't work because because we don't register the gutenberg/lib/meta-box-partial-page.php Lines 125 to 128 in dd015c9
|
Okay, how about we register the If a plugin then removes the |
Let me clarify some stuff so that we're all on the same page. Before #11084:
After #11084:
ACF removes the WordPress Custom Fields meta box by calling One potential fix would be for ACF to call
This could work, though we'd have to change how meta boxes are initialised because right now Gutenberg only knows whether a meta box is registered or not. There's currently no way for the server to express "I know about this meta box, but I didn't render it" which is what is needed in the case that Custom Fields is registered (i.e. ACF is disabled) but disabled (i.e. |
https://core.trac.wordpress.org/ticket/45282 + #11476 will fix this issue in 5.0. |
Describe the bug
When the Advanced Custom Fields plugin is enabled, the Custom Fields option displays but does not do anything.
To Reproduce
Expected behavior
The Field Group that you set up should be the only option underneath Advanced Panels.
Actual behaviour
Both the Field Group and Custom Fields appears underneath Advanced Panels.
Additional context
See #3228 and #11084 for background on Custom Fields in Gutenberg.
This happens because ACF hides the Custom Fields meta box by removing
postcustom
from the list of registered meta boxes. The Classic editor will not show the Custom Fields meta box whenpostcustom
is not registered. Gutenberg, conversely, will show Custom Fields whenever the current post type supportscustom-fields
.The text was updated successfully, but these errors were encountered: