umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.4k stars 2.66k forks source link

Saving a media-type with a rich-text property breaks the save media button #16011

Open mdeslauriers-sigmund opened 5 months ago

mdeslauriers-sigmund commented 5 months ago

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

13.2.2

Bug summary

Adding a property with the "Rich text" data-type to the "Image" media-type, cause a javascript error when the user create a new image in the media library. The save operation on the back-end seems successful, but the save button on the front-end keeps spinning and never return to its original state.

Specifics

Reproduced in Chrome and Firefox

The error occurs in the Media library, in the "Create Image Form" /umbraco#/media/media/edit/-1?doctype=Image&create=true

The spinner never resets:

image

The javascript console error is : modelObject is undefined:

image

Note : It also can be reproduced in the "Edit Image Form" if the richtext property is empty on the initial load.

Steps to reproduce

Modify de Media type

Create a new image

The error occurs here:

Expected result / actual result

Actual result :

Expected result :

github-actions[bot] commented 5 months ago

Hi there @mdeslauriers-sigmund!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:

nhudinh0309 commented 4 months ago

Hi @mdeslauriers-sigmund, Thanks for reporting this issue! I was able to reproduce it on version 13.2.2, 13.2.1 and 13.3.0. But for me, the JS console shown as below: Screenshot 2024-05-03 182546

I also tested on version 12.3.9 and the save function works without any problem. So this is a regression issue. I will go ahead and mark it as a sprint-candidate 😄