Make WordPress Core

Opened 12 months ago

Closed 10 months ago

Last modified 2 months ago

#61798 closed defect (bug) (reported-upstream)

Not possible to assign author to unowned post in the primary edit form

Reported by: mossy2100's profile mossy2100 Owned by:
Milestone: Priority: normal
Severity: minor Version: 6.6.1
Component: Editor Keywords: has-patch
Focuses: administration, coding-standards Cc:

Description

If a user is deleted, and their content is not reassigned, any posts of theirs will be trashed and will no longer have an author. Such a post can be restored, but will still not have an author. You can fix this by doing a Quick Edit and assigning the author to yourself (there's no other option).

However, if you go to the Edit page, there is no author shown and no link to click, although there is an invisible button where the author link usually is. This will bring up the author select dialog with your name shown. You can't change it, and if you close the dialog, the author remains unset and empty.

Attachments (2)

Screenshot 2024-08-01 at 3.38.06 PM.png (11.4 KB) - added by peterwilsoncc 12 months ago.
61798.patch (820 bytes) - added by iflairwebtechnologies 12 months ago.
Fixed: #61798 Not possible to assign author to unowned post in the primary edit form

Download all attachments as: .zip

Change History (11)

#1 @peterwilsoncc
12 months ago

  • Component changed from Posts, Post Types to Editor

Screenshot 2024-08-01 at 3.38.06 PM.png demonstrates the invisible button referenced in the ticket. I've moved this over to the editor component as the change to fix that will need to be made in the Gutenberg repository.

@mossy2100 Are you able to open a ticket on GitHub? This will ensure you are given due credit for discovering the error. https://github.com/wordpress/gutenberg/issues

#2 @mossy2100
12 months ago

Sure, I'll take care of it. Thanks for the prompt response, Peter.

@iflairwebtechnologies
12 months ago

Fixed: #61798 Not possible to assign author to unowned post in the primary edit form

This ticket was mentioned in PR #7123 on WordPress/wordpress-develop by @iflairwebtechnologies.


12 months ago
#4

  • Keywords has-patch added; needs-patch removed

Fixed: #61798 Not possible to assign author to unowned post in the primary edit form

We have checked the following issue

  • When the post is untrash (restored from trash), it does not check whether the authors still exist or not... So in that case, we can check first "if author user no exists, then assign the current user as the author of that post"

By doing this, It will assign the current user as an author to that restored post - only if the author is not present.

Ticket link : https://core.trac.wordpress.org/ticket/61798

#5 @iflairwebtechnologies
12 months ago

  • Focuses coding-standards added
  • Version changed from 6.6 to 6.6.1

@mossy2100

Fixed: #61798 Not possible to assign author to unowned post in the primary edit form

We have checked the following issue

  • When the post is untrash (restored from trash), it does not check whether the authors still exist or not... So in that case, we can check first "if author user no exists, then assign the current user as the author of that post"

By doing this, It will assign the current user as an author to that restored post - only if the author is not present.

Ticket link : https://core.trac.wordpress.org/ticket/61798

#6 @mossy2100
12 months ago

Seems like a satisfactory solution. I think a more optimal solution would be to ask the administrator who should be the new owner of the post, as a requirement for restoring the post, rather than assuming its them. But I understand that's more work to implement with perhaps low ROI.

Version 0, edited 12 months ago by mossy2100 (next)

#7 @iflairwebtechnologies
12 months ago

Hello @mossy2100

Yes, That point can be considered as a feature request for upcoming WordPress future updates.

Before work: It cannot assign an author after the restore post.

After work (now): The user can change the author once the post is restored.

#8 @peterwilsoncc
10 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

This was resolved in the Gutenberg repository, see WordPress/gutenberg#64163.

I've closed this ticket as reported-upstream.

#9 @yanshgupta
2 months ago

Has anyone else experienced this? Is this a known bug or is there a proper way to reassign authorship from the , Edit screen?

Any help would be appreciated!

Last edited 2 months ago by yanshgupta (previous) (diff)
Note: See TracTickets for help on using tickets.