-
Notifications
You must be signed in to change notification settings - Fork 679
Description
What happened?
Description
We're seeing a bug where the author field changes unexpectedly in a specific scenario, which is common in an editorial workflow.
Steps to reproduce
- Alice opens an entry with the author set to Bob and makes a change, which results in a provisional draft being created. She leaves it at that.
- Bob manually creates a draft of the same entry and changes a different field in the draft.
- Now Alice opens the draft created by Bob and applies it to the entry. The draft is now published, and the changes made by Bob are live.
- However, Alice still has their provisional draft, so they see the changes made by them with the blue indicator, and the changes made by Bob (and applied as part of the draft) with the orange indicator. But also, the author has changed from Bob to Alice in the provisional draft. The author field doesn't get the indicator.
- Now Alice wants to apply the changes in the provisional draft to the entry, so she saves it. Now the author of the entry has been changed to Alice.
Edit: Found an even simpler way to reproduce, you don't even need two users. All that is required is that Alice has a provisional draft and then applies another (real) draft, even one they created themselves.
Expected behavior
When Alice applies the draft created by Bob, the author should not change to Alice automatically.
Actual behavior
The author changes unexpectedly in the provisional draft.
Additional context
I initially thought this was a problem in the Workflow plugin, because it happened in that context. But I can reproduce this issue without the plugin. This situation, however, is very common when using the Workflow plugin.
Craft CMS version
5.8.11
PHP version
8.3
Operating system and version
No response
Database type and version
No response
Image driver and version
No response