Describe the Bug
When Autosave is on, User 1 is able to access and edit the post being edited by User 2, which causes data loss.
From @PatrikKozak in Discord:
"So the way document locking works is once a user saves the document, we unlock the document. Based on the video above, I can see you have autosave enabled. So whenever you start editing, the document will lock but as soon as autosave fires, the document is unlocked."
Link to Discord thread : https://discord.com/channels/967097582721572934/1347546084683022437
Link to the code that reproduces this issue
Website template using Payload v3.27.0
Reproduction Steps
- Enable Autosave
- Test Document locking with multiple editors
Which area(s) are affected? (Select all that apply)
Not sure
Environment Info
Payload v3.27.0
Nextjs v15.2.0
Node v22.13.0
Describe the Bug
When Autosave is on, User 1 is able to access and edit the post being edited by User 2, which causes data loss.
From @PatrikKozak in Discord:
"So the way document locking works is once a user saves the document, we unlock the document. Based on the video above, I can see you have autosave enabled. So whenever you start editing, the document will lock but as soon as autosave fires, the document is unlocked."
Link to Discord thread : https://discord.com/channels/967097582721572934/1347546084683022437
Link to the code that reproduces this issue
Website template using Payload v3.27.0
Reproduction Steps
Which area(s) are affected? (Select all that apply)
Not sure
Environment Info