Opened 6 years ago
Closed 6 years ago
#45172 closed defect (bug) (fixed)
Custom meta boxes do not show up
Reported by: | zodiac1978 | Owned by: | pento |
---|---|---|---|
Milestone: | 5.0 | Priority: | normal |
Severity: | normal | Version: | 5.0 |
Component: | Editor | Keywords: | has-patch, needs-testing, commit, fixed-5.0 |
Focuses: | Cc: |
Description
Using the Gutenberg plugin custom meta boxes showed up ( added with add_meta_box() ).
With 5.0-alpha-43818 alone (no Gutenberg plugin active) these custom meta boxes do not show up for me.
You can try this plugin for testing:
https://wordpress.org/plugins/very-simple-event-list/
Attachments (3)
Change History (18)
@
6 years ago
With Gutenberg plugin active the custom meta boxes appear (and an unexptected error message)
This ticket was mentioned in Slack in #core-editor by swissspidy. View the logs.
6 years ago
#6
@
6 years ago
We suspect this may be caused by the priority (and possibly implementation) of core's wpautop
, which differs from the Gutenberg's plugin override gutenberg_wpautop
, registered with priority 8.
See GitHub comment in this (generally unrelated) Gutenberg issue.
cc @pento (who will be gracious enough to excuse my constant summoning)
#7
@
6 years ago
- Owner set to pento
- Status changed from new to assigned
That priority only mattered for the Gutenberg plugin: it was to ensure that wpautop()
was removed from the the_content
filter, before the function was run. The has_blocks()
check is now part of wpautop()
, so there's no need to remove it from the filter anymore.
I'll write up a patch to fix this.
#8
@
6 years ago
- Keywords has-patch needs-testing added
The equivalent of gutenberg_collect_meta_box_data()
was missing. Rather than just merge that function it, which is basically a duplicate of a large chunk of edit-format-advanced.php
, I moved the common code to a new function, which both edit forms are now able to call.
45172.diff is a first pass at this, it needs testing.
#9
@
6 years ago
Closed https://github.com/WordPress/gutenberg/issues/11058 as a duplicate but then noticed that that issue mentions wp_add_dashboard_widget()
and this issue mentions add_meta_box()
and I was wondering if a separate issue should be opened for the one I closed or if it's covered by the work here?
#12
@
6 years ago
- Keywords commit added
I've tested 45172.diff with the various callback arguments introduced for 5.0.
__block_editor_compatible_meta_box
does toggle the display correctly on the new editor. Setting the option to false does not cause the post type to fall back to the classic editor but that can be dealt with on another ticket.__back_compat_meta_box
also toggles display correctly.
There are a few coding standards fixes required. As the patch mostyly moves existing code, these can be handled in the 5.1 release.
No custom meta boxes with 5.0-alpha-43818