Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#48512 new defect (bug)

Post editor can show wrong author, if user role was changed

Reported by: equin0x80's profile equin0x80 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: 2nd-opinion
Focuses: Cc:

Description

  • Go to Add New User. Create a new user who is a Contributor.
  • Go to Add New Post. Type any random text as the content. Set the Author (in the dropdown list) to the author you just created. Save the post.
  • Go to the user you created, and change their role to "No role".
  • Go back to Posts, and find the post you created. Edit it.
  • Observe that the Author dropdown now shows the wrong author, since the user is no longer eligible to appear in the dropdown list.
  • Fortunately, even if you edit and save the post, it does not actually overwrite the correct author with the wrong one. Still, the display is very misleading. A bug in my opinion.

Change History (2)

#1 @swissspidy
5 years ago

  • Keywords 2nd-opinion added

Hmm interesting. I often use this to assign a post to a user without having to give them all the rights to edit the post as well. So I temporarily change their role, assign the post, and then make them a subscriber.

I'd love to hear some other opinions on this, but personally I think this is a feature.

#2 @knutsp
5 years ago

Have seen this. The select control is dangerous because when the stored value is not in the list (of acceptable values) the first element is shown as current, which is false. On plain implementations it will also save.

IMHO, all selections lists should either be merged with the actual stored value, or make it invalid, forcing the user to select a valid item.

Note: See TracTickets for help on using tickets.