-
Notifications
You must be signed in to change notification settings - Fork 32
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
Editor: Fix error when creating new record #1061
Conversation
Affected libs:
|
📷 Screenshots are here! |
…ror notifications
since this provokes calling the edit-record.resolver which needs a metadata xml too early and results in an exception note: bug ccould be reproduced from any second access to /create
…fier changes this causes exceptions when modifying fields in a draft. it does not seem to be used anymore, since the uniqueIdentifier has been replaced by the resourceIdentifier
I'm not sure that this fix is the right way forward; the automatic redirection from /create to /edit/TEMP-ID-XXX was made so that refreshing the page was not going to create a new record but instead leave the user on the same draft. Maybe if it's just a timing issue a different fix could be found? I'm taking a look right now |
Thanks for the feedback @jahow! I didn't think of reloading the app on create, good catch! I've noticed that the reverted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I just saw two new things that should be addressed, sorry 😬 I'll approve the PR and let you merge when you think it's done :)
Description
The goal of this PR is to fix the error when creating a new record. The same exception sometimes occurs when editing fields of a draft. A first commit ensures errors displayed via the
notifications.service
still to be logged to the console.The actual error is caused by the fact that the
EditRecordResolver
is called even when routing to/create
. This happens due to thenavigate['edit']
calls within the component. Both navigations have been removed:/create
. => This prevents the exception when creating a new record.uniqueIdentifier
with theresourceIdentifier
in the form. => This prevents the exception when editing fields of a draft.Note to reproduce: The issue occurs on the first access to
/create
after app reload. It starts with the second access to/create
or accessing/create
after/edit
.Screenshots
Quality Assurance Checklist
breaking change
labelbackport <release branch>
label