Open nackler opened 2 months ago
Hi there @nackler!
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:
Ugh, I just realized it is also possible that I got into this situation by adding a file extension to the predefined 'file' datatype then removing it again, which might explain the switch from {} to {"fileExtensions":null} in the config. Maybe that is the real bug and this has nothing to do with an upgrade to v14. Sorry about the lack of clarity.
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
14.2.0
Bug summary
Upgraded a v13 project to v14. This does not happen on a fresh install of v14.
As a content editor - exception when creating a 'File' (not 'Image') media item in the media library with a file type of PDF. See call stack below.
I was able to get around what is essentially a null reference exception by running a SQL command that changes the stored configuration from "{"fileExtensions":null}" to "{}" for nodeId -90.
update umbracoDataType set config = '{}' where propertyEditorAlias = 'Umbraco.UploadField' and config = '{"fileExtensions":null}'
A new v14 install had the configuration as "{}" but my upgraded instance had "{"fileExtensions":null}" for the DataType config. Caveat: It is possible that a usync automatic import preserved what is now apparently an invalid value in my database.
This bug report is to perhaps help someone else in this situation or perhaps some more null handling can be added to FileUploadPropertyValueEditor.IsAllowedInDataTypeConfiguration so that fileUploadConfiguration.FileExtensions is checked for null before .Any gets called on it.
Another option would be to make the data change part of the upgrade data migration during upgrade if it isn't already.
Specifics
Steps to reproduce
Create a v13 project Upgrade it to v14 Upload a media item to the media library of type 'File' (I used a pdf)
When saving, you will get the exception 'Value cannot be null. (Parameter 'source')" in a pink validation error popup in the bottom right hand corner of the backoffice.
If you can't recreate this issue then maybe this was a situation exacerbated by uSync, in which case I probably did something wrong by not disabling usync during my upgrade and you can disregard.
Expected result / actual result
I expected that the media item would save, but instead the above exception occurred.