Make WordPress Core

Opened 23 months ago

Last modified 21 months ago

#56429 new defect (bug)

Gutenberg author box missing

Reported by: lgadzhev's profile lgadzhev Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.0.1
Component: Editor Keywords: needs-patch has-testing-info
Focuses: javascript, administration, rest-api Cc:


There is a bug related to the author box missing when all of the following conditions are true:

  • When there are more than 70 users in a WP installation
  • When an Editor creates a post and saves it as a draft. This must be the only post of that user
  • If all the users are ordered alphabetically, that user must be above 60 in the order

When this is true, if another Editor opens that draft, the author box won't be visible. There is an additional request that should fetch that user and it's returning error 403

If Administrator opens it, the author box is present

The cause for the bug is the last condition that fails here - because the function checks for the author of the post

Change History (5)

#1 @SergeyBiryukov
23 months ago

  • Focuses rest-api added

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

23 months ago

#3 @ironprogrammer
23 months ago

  • Keywords needs-testing-info added

Thank you for the report, @lgadzhev, and welcome to Trac!

Detailed steps to reproduce the issue would be very useful here.

Last edited 23 months ago by ironprogrammer (previous) (diff)

#4 @vabrashev
21 months ago

Will try to add the missing info:

Testing Instructions

These steps define how to reproduce the issue, and indicate the expected behavior.

Steps to Reproduce

  1. Log in to your local WP installation and create 100 "dummy" users with role Editor. If you have wp CLI enabled you can use this command for i in {1..100}; do wp user create editor${i} editor${i}@editor${i}.com --user_pass=editor${i} --role=editor; done. This will create 100 users with equal combination of username and password like "usernameN"/"passwordN", e.g. editor1/editor1, editor2/editor2, editor3/editor3, etc.
  2. Log in with user "editor1", create a new "Test Post" and set the Author to "editor99" (by searching in the input field) -
  3. 🐞 Log in in incognito mode or with a different browser with user "editor2" and open the very same post. You will notice that the Author post is not visible and you cannot change the Author -

Expected Results

When testing a patch to validate it works as expected:

  • ✅ The Author box should always be visible whether it's in the first 50 users in the dropdown ordered alphabetically or not. Every editor should have the ability to see who's the author of the post and have the ability to change it.

When reproducing a bug:

  • ❌ The bug happens when inside a WP installation there are more than around 50 users. When a user enters the Block Editor, the author dropdown shows around 60 users max - You can freely use the dropdown search, even for editors but still, the initial load shows only around 50 users in the dropdown. Normally this is fetching the first users in alphabetical order. If the user is among the first 50 users, it's going to be shown as the author of the post and everything will be fine but if it's not, the Block Editor will make an additional call to fetch that specific user. Unlike the call that is used for the dropdown's search, this call returns more information about the user and requires some additional capabilities, which Editors as user role don't have and it's breaking the author box
Version 0, edited 21 months ago by vabrashev (next)

#5 @ironprogrammer
21 months ago

  • Keywords has-testing-info added; needs-testing-info removed
Note: See TracTickets for help on using tickets.