Make WordPress Core

Opened 4 years ago

Closed 2 years ago

Last modified 2 years ago

#51096 closed defect (bug) (worksforme)

Meta boxes hooked on 'edit_form_after_title' don't appear on block-editor page

Reported by: apedog's profile apedog Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: Cc:

Description

The Gutenberg/block-editor page does not print meta boxes hooked on edit_form_advanced action. Meta boxes hooked on edit_form_advanced only show up in classic editor mode.

Block-Editor pages should still print out the meta boxes. Even if they cannot, for technical reason, be printed directly after the title.

I believe this should be viewed as a regression/bug. Not a feature request/enhancement.

Attachments (1)

add_metabox_using_edit_form_after_title.jpg (95.0 KB) - added by costdev 3 years ago.
Metabox being printed when hooking edit_form_after_title

Download all attachments as: .zip

Change History (10)

#1 @apedog
4 years ago

  • Summary changed from Meta boxes hooked on 'edit_form_advanced' don't appear on block-editor page to Meta boxes hooked on 'edit_form_after_title' don't appear on block-editor page

That's an unfortunate copy-paste typo.
Hook I'm talking about is edit_form_after_title

I've no idea how edit_form_advanced meta boxes behave on block editor pages.

This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.


3 years ago

#3 @poena
3 years ago

  • Milestone changed from Awaiting Review to 5.8

Hi
This issue was discussed during a triage session today and it was decided to move it to the 5.8 milestone to get more eyes on it.

When looking for background information about if or why there is no fallback for printing the metaboxes elsewhere, we found this migration guide: https://github.com/danielbachhuber/gutenberg-migration-guide.

#4 @hellofromTonya
3 years ago

  • Milestone changed from 5.8 to 5.9

Today is a freeze for 5.8 as it's Beta 1 day. As investigation is ongoing and there's not a patch yet, punting to 5.9 for resolution.

#5 @costdev
3 years ago

Can someone clarity this issue for me?

The following in functions.php shows a metabox at the bottom of the Gutenberg block editor when adding a new post and editing an existing post.

<?php

function add_metabox_using_edit_form_after_title( $post ) {
        add_meta_box(
                'a-meta-box',
                'A Meta Box',
                'render_a_meta_box',
        );
}

function render_a_meta_box( $post ) {
        ?>
        <h1>Hello World!</h1>
        <?php
}

add_action( 'edit_form_after_title', 'add_metabox_using_edit_form_after_title', 10, 1 );

@costdev
3 years ago

Metabox being printed when hooking edit_form_after_title

#6 @hellofromTonya
3 years ago

  • Milestone changed from 5.9 to 6.0

With 5.9 Beta 1 release happening in a few hours and ongoing discussion and no patch yet, moving this ticket to 6.0.

#7 @pyrobd
2 years ago

Could not recreate the issue

#8 @costdev
2 years ago

  • Milestone 6.0 deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • This issue was not able to be reproduced.
  • There are numerous closed issues on the Gutenberg repository that mention metabox positioning. Without more information, it's not clear which, if any, of these issues may relate to the reported issue.
  • If this is still an issue and can be reproduced, this should be discussed on the Gutenberg repository.

Given all of the above, I'll close this ticket as worksforme, but if an existing Gutenberg issue deals with this problem, or a new issue is reported, drop a link into this ticket and change the resolution to reported-upstream.

Last edited 2 years ago by costdev (previous) (diff)

#9 @costdev
2 years ago

  • Resolution changed from invalid to worksforme
Note: See TracTickets for help on using tickets.