Automattic / Co-Authors-Plus

Multiple bylines and Guest Authors for WordPress
https://wordpress.org/plugins/co-authors-plus/
GNU General Public License v2.0
291 stars 204 forks source link

Impossible to Reassign Posts to a Guest Author #732

Open MadtownLems opened 4 years ago

MadtownLems commented 4 years ago

From the ReadMe:

'What happens to posts and pages when I delete a user assigned to a post or page as a coauthor?

When a user is deleted from WordPress, they will be removed from all posts for which they are co-authors. If you chose to reassign their posts to another user, that user will be set as the coauthor instead.'

My Guest Authors aren't showing up in the dropdown box as a valid target for reassignment. Is that a bug, or by design?

When someone leaves our organization, we'd love to reassign their posts to a Guest Author (instead of their actual WordPress user account which gets removed).

rebeccahum commented 4 years ago

Was the guest author deleted as well? This is strange, as it should show up as a valid target for reassignment. If you can let me know how to reproduce this on a clean install, that would be great, thanks!

MadtownLems commented 4 years ago

Was the guest author deleted as well?

No, the Guest Author wasn't also deleted.

Note: I realized that I failed to indicate that this is in MultiSite. As such, it actually makes some sense for Guest Authors to NOT be visible as a target for reassignment, right, because the Network Administration pages have no concept of 'Guest Authors' ?

However, I then tried Network Activating Co-Authors plus and it still didn't show up.

Can you confirm that Guest Authors should appear as viable targets for reassignment in MultiSite?

Thanks!

rebeccahum commented 4 years ago

@MadtownLems Ah! So, guest authors wouldn't be available on a network-basis.

MadtownLems commented 4 years ago

So, to confirm, in MultiSite - there is actually no way to re-assign posts to a Guest Author when deleting a regular User? (like you can to a typical WordPress user)

rebeccahum commented 4 years ago

@MadtownLems Are you deleting the user from the network admin? Or in the subsite itself?

MadtownLems commented 4 years ago

On Multisite, you can't delete a user from the subsite - you can only remove. And removing doesn't actually prompt for content reassignment like deleting on the Network Admin does. :/

rebeccahum commented 4 years ago

Right, so the re-assignment does not work on multisite on deletion. You could give the CLI command a shot wp co-authors-plus swap-coauthors: https://github.com/Automattic/Co-Authors-Plus/blob/221e4df88d65b1ba2eb4467d16e4ba74d82f37c9/php/class-wp-cli.php#L418 and then delete the user after all posts have been swapped.