Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post Author block displays "0" in the inspector controls #51342

Closed
mcliwanow opened this issue Jun 8, 2023 · 0 comments · Fixed by #51345
Closed

Post Author block displays "0" in the inspector controls #51342

mcliwanow opened this issue Jun 8, 2023 · 0 comments · Fixed by #51345
Assignees

Comments

@mcliwanow
Copy link
Contributor

mcliwanow commented Jun 8, 2023

Description

When using the Post Author block as an Editor, the getUsers() returns an empty list of authors and "0" is displayed in the inspector controls

Screenshot 2023-06-08 at 16 23 13

My guess would be that Editor cannot change the author of the post (which makes sense) but "0" shouldn't be displayed. It should be enough to change the following line to actual boolean check

Step-by-step reproduction instructions

  1. Add a post as an admin
  2. Create a post or page
  3. Log in as another user with Editor role
  4. Add a Post Author block to the previously added page (or to a new one)

Screenshots, screen recording, code snippet

No response

Environment info

  • Wordpress Version 6.3-alpha-55896 (started with wp-env)
  • Gutenberg current trunk 16.0.0-rc.1

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 github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jun 8, 2023
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants