Make WordPress Core

Opened 17 months ago

Closed 17 months ago

Last modified 12 months ago

#59395 closed defect (bug) (wontfix)

Update post button is always enabled when there is a meta box in the block editor

Reported by: rilwis's profile rilwis Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.3.1
Component: Editor Keywords: has-screenshots has-testing-info
Focuses: ui Cc:

Description

When editing a post in the block editor, if there's any meta box for the post, the "Update" post button is always enabled (active), even if there's no changes in the content.

For the test, I use this snippet to create a simple meta box, which outputs just a text:

add_action( 'add_meta_boxes', function() {
	add_meta_box( 'test', 'Test', 'my_callback_func', 'post' );
} );

function my_callback_func() {
	echo 'Just a text, and the Update button is always active.';
}

And when editing a post, like "Hello world", the update button is always enabled like this, even though the post title and content don't change.

https://i.imgur.com/jJqfTui.png

When I click the "Update" button to save data, it's disabled while saving, and then is enabled again.

The normal behavior is that when there's no changes, it's always disabled. Or after saving the post, it's disabled.

In this case, it's always enabled, which seems to be a UX bug.

Change History (6)

This ticket was mentioned in Slack in #core-test by ironprogrammer. View the logs.


17 months ago

#2 @ironprogrammer
17 months ago

  • Keywords has-testing-info added

Reproduction Report

Environment

  • Hardware: MacBook Pro Apple M1 Pro
  • OS: macOS 13.5.2
  • Browser: Safari 16.6
  • Server: nginx/1.25.2
  • PHP: 7.4.33
  • WordPress: 6.4-alpha-56267-src
  • Theme: twentytwentythree v1.2
  • Active Plugins:
    • gutenberg v16.6.0 (both active and deactivated)

Actual Results

  • ✅ The Update button is active (reproduced).

Additional Notes

  • Testing with draft posts, the "Save draft" link is also active. See Figure 1.

Supplemental Artifacts

Figure 1:
https://cldup.com/SxH2bTY9mF.thumb.png

#3 @ironprogrammer
17 months ago

Thank you for the report @rilwis! This type of issue should be fixed upstream in Gutenberg, so would you please report it in Gutenberg Issues?

You can copy contents of your report into the issue there. Please refer to this Trac ticket, and note that it was reproduced during Test triage.

Once the GB ticket has been created, please drop a note (and link) here and we will resolve this with reported-upstream. Thank you!

#4 @Mamaduka
17 months ago

This isn't a bug. The save buttons are always active, as the block editor cannot track changes in the meta box fields.

See https://github.com/WordPress/gutenberg/pull/4184.

#5 @rilwis
17 months ago

  • Resolution set to wontfix
  • Status changed from new to closed

I got it. If that's already decided, then this ticket can be closed.

Thank you for your information.

#6 @swissspidy
12 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.