You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A user can save a document during autosave. When transactions are used (with replicaSet and haven't tested Postgres but probably too) this causes race conditions, from logs:
[14:53:45] ERROR: There was an error cleaning up old versions for the collection projects
[14:53:45] ERROR: TypeError: Cannot read properties of undefined (reading 'version')
[14:53:45] ERROR: Caused by :: Write conflict during plan execution and yielding is disabled. :: Please retry your operation or multi-document transaction.
(MongoServerError)
We should disable the publish button during autosave
Reproduction Steps
Enable autosave in a collection/global config and try to publish a document during autosave.
And important to have replicaSet when using MongoDB (mongodb atlas or configured docker compose with it) either way transactions aren't used.
ERROR: Caused by :: Write conflict during plan execution and yielding is disabled. :: Please retry your operation or multi-document transaction. is still an issue and seems to be happening more since 3.4.0 with autosave.
Activity
PP-Tom commentedon Dec 5, 2024
ERROR: Caused by :: Write conflict during plan execution and yielding is disabled. :: Please retry your operation or multi-document transaction.is still an issue and seems to be happening more since 3.4.0 with autosave.cgilly2fast commentedon Dec 9, 2024
Getting this error with autosave too, happens if I click publish too soon after making an update to my document:
fix(ui): disable publish button if form is autosaving (payloadcms#11343)
github-actions commentedon Mar 4, 2025
🚀 This is included in version v3.26.0
github-actions commentedon Mar 12, 2025
This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.