WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.37k stars 4.15k forks source link

"Updating" label and post_modified ahead by one second when a metabox exists on Post Editor #59136

Open asadkn opened 7 months ago

asadkn commented 7 months ago

Description

When a new post is Published, and any metabox is registered (whether by a plugin or a theme), the post_modified is sporadically one second ahead of normal post date.

Also I am not sure if related, but "Updating.." is also shown briefly on clicking Publish (Chrome browser). I am not sure of the workflow or relevance, but this affects some auto-poster social media plugins too which will post twice.

This is a difficult issue to replicate as it only happens sometimes (I am not sure if it matters but slowing down in performing the steps below might be a trigger). I have replicated this locally and on remote test environments.

Step-by-step reproduction instructions

Steps to recreate:

  1. Install a default theme (I tested with Twenty Twenty-One). Test on Chrome browser.
  2. Add a sample metabox to the functions.php file: https://developer.wordpress.org/plugins/metadata/custom-meta-boxes/#oop
  3. Go to Posts > Add New Post.
  4. Check the wp_posts table with phpMyAdmin. post_modified will be one second ahead of post_date.

To reiterate, this happens sporadically so 5-6 tests (or sometimes with a pause) might be needed before you see it or it may happen on the first try.

Screenshots, screen recording, code snippet

Screencast: https://d.pr/v/LiNC64

Environment info

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

github-actions[bot] commented 6 months ago

Hi, This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps. Thanks for helping out.