Skip to content
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

bug: Multiple changes in quick succession on new entry cause exception #1757

Closed
myieye opened this issue Jun 19, 2023 · 4 comments · Fixed by #1758 or #1761
Closed

bug: Multiple changes in quick succession on new entry cause exception #1757

myieye opened this issue Jun 19, 2023 · 4 comments · Fixed by #1758 or #1761

Comments

@myieye
Copy link
Collaborator

myieye commented Jun 19, 2023

Describe the bug
Making multiple changes in quick succession on a new entry can lead to an exception.

When a new entry is created it doesn't have an ID. When making multiple changes quickly, the state of the ID is not managed well and as a result ends up geting included in the entry-diff. The differ doesn't know that the server doesn't like string IDs, but IDs should never be part of the diff anyway, because they should only get set by the server.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Editor
  2. Click on '+' (Create new entry). Note: an entry only actually gets created when some data is added to it.
  3. Quickly click on "Add meaning" and then "Add example"
  4. See error

Context
Reported by user: #1754 (comment)

@myieye
Copy link
Collaborator Author

myieye commented Jun 19, 2023

I've also found some race conditions that come into play when a user makes a change and then navigates to a different entry before the save has round-tripped to the server. In my opinion it's actually more likely that that is what the user was experiencing. I've added fixes to the open PR.

Presumably I will merge, test and deploy this fix tomorrow.

@lambaradan
Copy link

My scenario involved updating one or two fields in a few different entries in fairly rapid succession. The error took a minute or two to show itself always. I hope your fix works, @myieye ! Thanks.

@myieye
Copy link
Collaborator Author

myieye commented Jun 22, 2023

@lambaradan These fixes were just deployed. So, if anything is still going wrong, we'd love to know about it!
Thanks for reporting this!

@lambaradan
Copy link

@myeye I have been able to update multiple fields in entries, one after another. And nothing I have done has triggered an error message. It seems to be working just fine. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants