-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
metadata update function catch case fixes #6559 #6571
base: master
Are you sure you want to change the base?
Conversation
Cloudflare Pages deployment
|
src/styles/videoosd.scss
Outdated
@@ -85,7 +85,7 @@ | |||
bottom: 0; | |||
left: 0; | |||
right: 0; | |||
background: rgba(0, 0, 0, 0.7); | |||
background: none; |
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.
Unrelated changes.
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.
I would split this fix into a separate PR targeting the release-10.10.z
branch.
function afterContentTypeUpdated() { | ||
toast(globalize.translate('MessageItemSaved')); | ||
async function submitUpdatedItem(form, item) { | ||
const apiClient = getApiClient(); |
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.
I would move it back to where it was to make fewer changes.
apiClient.ajax({ | ||
try { | ||
await apiClient.updateItem(item); | ||
const newContentType = form.querySelector('#selectContentType')?.value || ''; |
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.
Why check the existence of an element on your own static form?
I'm just not a fan of overly secure programming (just checking for the sake of checking). 😅
|
||
url: apiClient.getUrl('Items/' + item.Id + '/ContentType', { | ||
if ((metadataEditorInfo?.ContentType || '') !== newContentType) { |
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.
We probably shouldn't even start doing anything if metadataEditorInfo
is undefined/null. Maybe just throw an exception at the beginning of the function instead of optional chaining?
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.
seeing that this check is to just update the items content type when there is change in content type and ignore if otherwise. we can directly ignore the check and lets do the update content api even if its redundant.
cbcad15
to
ae4e64d
Compare
|
Fix: catch block for metadataupdate function to fix infinite loader when update api fails fixes #6559
Changes
Issues
fixes #6559
Proof of testing
https://youtu.be/3YHXEthmzoY