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

The post author does not show up, nor is selected in the sidebar controls #54326

Closed
Sisanu opened this issue Sep 9, 2023 · 7 comments · Fixed by #58716
Closed

The post author does not show up, nor is selected in the sidebar controls #54326

Sisanu opened this issue Sep 9, 2023 · 7 comments · Fixed by #58716
Assignees
Labels
[Feature] Document Settings Document settings experience [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@Sisanu
Copy link
Contributor

Sisanu commented Sep 9, 2023

Description

The post author does not show up, nor is selected in the sidebar controls

Step-by-step reproduction instructions

  1. Create a post with user 1
  2. Open the post with user 2 or admin
  3. The sidebar author dropdown shows selected the current user
  4. The sidebar author dropdown does not include user 1 in the list of options
  5. The author is shown correctly in the "quick edit" dialog, but not in the "edit post"

Screenshots, screen recording, code snippet

No response

Environment info

  • Core 6.3.1
  • PHP 8.0.22

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

@Mamaduka Mamaduka added Needs Testing Needs further testing to be confirmed. [Feature] Document Settings Document settings experience labels Sep 9, 2023
@jordesign jordesign added the [Type] Bug An existing feature does not function as intended label Sep 12, 2023
@github-actions
Copy link

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.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Oct 13, 2023
@Mamaduka Mamaduka removed the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Oct 13, 2023
Copy link

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.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Nov 13, 2023
@Mamaduka Mamaduka removed the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Nov 13, 2023
@t-hamano
Copy link
Contributor

Thanks for the report, but I did not replicate it. I tested with the steps below.

  • Create two users with Editor role (Editor 1, Editor 2)
  • Log in as "Editor 1" user and publish a post
  • Log in as "Editor 2" user and open the post
  • Check the sidebar author dropdown

Could you tell me what roles you applied to the user you created?

dashboard

editor

@t-hamano t-hamano added [Status] Needs More Info Follow-up required in order to be actionable. and removed Needs Testing Needs further testing to be confirmed. labels Jan 11, 2024
@Sisanu
Copy link
Contributor Author

Sisanu commented Jan 11, 2024

Hi! Thanks for looking into this. Try changing the role for the user that created the post. When you open the post again, it does not show who created it, and also when you save the author user is lost.

@t-hamano
Copy link
Contributor

Try changing the role for the user that created the post. When you open the post again, it does not show who created it, and also when you save the author user is lost.

I tried the following steps, but I still couldn't reproduce it. Am I missing something?

  • As admin user, create two users with Editor roles (Editor 1, Editor 2)
  • Log in as "Editor 1" user and publish a post
  • Log in as "Editor 2" user
  • Open the post created by "Editor 1": ✅All users are displayed correctly
  • Log in again as admin user
  • Change "Editor 1" role to Author
  • Open the post created by "Editor 1": ✅All users are displayed correctly
  • Log in as "Editor 2" user
  • Open the post created by "Editor 1": ✅All users are displayed correctly

@Sisanu
Copy link
Contributor Author

Sisanu commented Jan 13, 2024

Editor 1 creates the post. Then editor 1 is demoted to subscriber for example. When you are an admin and edit the post that editor 1 created, editor 1 is not in the list and when saving the post the admin becomes the author of the post, which is not correct.

As far as I recall, the only place where an admin takes over the posts of other users is when the user account is deleted, mostly as a fallback, but authorship should not be removed in the workflow because of the user role change.

To avoid this, perhaps the author dropdown needs to have all users with edit post capabilities plus the current post author.

@t-hamano
Copy link
Contributor

@Sisanu Thank you for explaining in detail.

Editor 1 creates the post. Then editor 1 is demoted to subscriber for example. When you are an admin and edit the post that editor 1 created, editor 1 is not in the list and when saving the post the admin becomes the author of the post, which is not correct.

With these steps, I was able to reproduce the problem. If I enable the Classic Editor plugin, all users will be visible, even if the user who created the post has been demoted to subscriber.

To avoid this, perhaps the author dropdown needs to have all users with edit post capabilities plus the current post author.

I think this approach is probably correct. Posts that have already been created should include the user who created the post, regardless of their roles. Here's how it works in the Classic Editor:

  • When an administrator creates a new post: The Author dropdown does not display users with the subscriber role
  • When an administrator edits an existing post: The Author dropdown includes the user who created the post

@t-hamano t-hamano removed the [Status] Needs More Info Follow-up required in order to be actionable. label Jan 15, 2024
@Mamaduka Mamaduka self-assigned this Feb 6, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Document Settings Document settings experience [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants