-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File/Image delete causes 409 error response on page update #6129
Comments
Same problem with the latest Nova v4.34.3. |
Thanks @29avet1 for reporting this, I'll be looking into it 🕵️ |
Seems like I can't reproduce this 🤔 After looking at how components are stacked and the chain of events in the described case, all is good with updating images:
|
@jeremynikolic
|
I've rerun my tests on different storages, as well as file and image fields, same as last time. |
Hey there, We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem. |
Description:
When we delete a file or image on page edit, then we click the update button, it throws a 409 error "Another user has updated this resource since this page was loaded".
It is caused by the fact that after deleting the image it touches the row in db, sets the image name to null, and also "updated at" is getting refreshed. By this, the "retrieved_at" value is responsible for checking whether another person has edited this resource or not, becomes outdated.
I saw that the nova file input triggers an event "file-deleted", which in "HasOneFiled.vue" is handled and triggers another "update-last-retrieved-at-timestamp" event, which I suppose updates the retrieved_at value to avoid this issue, but in "Update.vue" the "handleFileDeleted" method is empty and not triggering the "update-last-retrieved-at-timestamp" event.
Detailed steps to reproduce the issue on a fresh Nova installation:
The text was updated successfully, but these errors were encountered: