-
Notifications
You must be signed in to change notification settings - Fork 683
[5.x]: It's impossible to remove the author from an entry, or leave an author empty #18655
Description
What happened?
Description
When a user saves an entry without an author, they are always assigned as the author upon saving. Even if you manually remove the current author, the author is assigned again when you save. It's impossible to reset an entry to a state where it has no author.
Steps to reproduce
- Create an entry.
- Remove the author and save.
Expected behavior
- When you save an entry without an author, it should be possible to leave the author empty. This should either be the default, or there needs to be an option in the form to prevent your own account from being assigned as the entry's author.
- When you remove all existing authors from an entry, the author property should stay empty.
It should be possible to make an entry not have an author. When an entry is created programmatically, it doesn't have an author. So not having an author is already an existing and valid state that is supported.
There are multiple reasons for wanting the author to stay empty. For example, we have a function that creates entries programmatically. When the function is executed by a logged-in user, their account is set as the author of the created entry. When it's executed by a guest, the author stays empty. We use the author field to tell who created an entry. However, when a logged-in user edits one of those entries, they are automatically assigned as author and it's impossible to prevent or reset this. This muddies the waters, because the entry now looks like one created by that user.
Actual behavior
Authors are always automatically assigned, with no way to override or prevent this behaviour manually.
Craft CMS version
5.9.14
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response