leekelleher / umbraco-contentment

Contentment for Umbraco - a state of happiness and satisfaction
https://marketplace.umbraco.com/package/umbraco.community.contentment
Mozilla Public License 2.0
155 stars 70 forks source link

Data List not saving single values (Dropdown List, Radio Button List) in Umbraco 9.3.0 #200

Closed AaronSadlerUK closed 2 years ago

AaronSadlerUK commented 2 years ago

Which Contentment version are you using?

3.1.0

Which Umbraco version are you using? For example: 8.14.1 - don't just write v8

9.3.0

Bug summary

The value gets lost while saving

Steps to reproduce

Watch video :)

https://user-images.githubusercontent.com/9937803/153685042-17c42ce6-6b3a-4877-9fae-8793ce3a5979.mp4

Expected result / actual result

No response

Do you have Umbraco ModelsBuilder enabled?

What browsers are you seeing the problem on?

Microsoft Edge

leekelleher commented 2 years ago

@AaronSadlerUK Thanks for reporting this.

A few questions so I can try reproduce the issue.

AaronSadlerUK commented 2 years ago

@leekelleher I last updated that page in Umbraco 9.0 and contentment 3.0.0 which worked fine.

I tried it with 9.3 and 3.0.0 which didn't work, so I upgraded to content 3.1.0 which also didn't work.

There is no errors in the console, the saved data is also incorrect, as on the front end it is wrong also.

Yes this is within a block list item.

leekelleher commented 2 years ago

Thanks @AaronSadlerUK. I'm getting a feeling that something may have changed in the Block List editor recently. 🤔 I'll investigate. 👍

AaronSadlerUK commented 2 years ago

Thanks @leekelleher, give me a shout if you want to screenshare 👍

leekelleher commented 2 years ago

I can reproduce the issue on Umbraco v9.3.0.

The frustrating part is that I've tested this on v9.0.0 (this morning) and it worked fine (inside Block List). I'll continue investigating... 🧐

leekelleher commented 2 years ago

Okay, it appears to be when a Data List is configured to use a list-editor that stores a single value, e.g. dropdown list or radiobuttons.

Because Data List's underlying data-editor value type is set to JSON, the single string values appear to now be encoded as JSON strings, e.g. what used to be "value" is now "\"value\"". Meaning that the list-editor treats that as the literal value and can't populate the dropdown/radiobutton. 😫

My gut feeling is these changes in v9.3.0 - https://github.com/umbraco/Umbraco-CMS/pull/11806 - but I can't be sure. It feels quite far down the rabbit hole, (e.g. I'd lose a dev day just investigating it.)

The Data List editors that store multiple values, e.g. Item Picker, Checkbox List, etc - they all appear to still work in v9.3.0.

I'll explore my options for a workaround/fix.

leekelleher commented 2 years ago

Linking for cross-reference: https://github.com/umbraco/Umbraco-CMS/issues/11989 It appears to be a regression bug that may be fixed in an Umbraco patch release.

leekelleher commented 2 years ago

Fingers crossed, this is resolved in Umbraco v9.3.1 🤞 re: https://github.com/umbraco/Umbraco-CMS/pull/12015

AaronSadlerUK commented 2 years ago

Ok great, I'm not sure when 9.3.1 is penned for release.

Do you know if they will be adding an RC or Prerelease to test?

leekelleher commented 2 years ago

Ok great, I'm not sure when 9.3.1 is penned for release. Do you know if they will be adding an RC or Prerelease to test?

I haven't heard any firm dates, and doubt there'll be a prerelease since it'll be a patch release. But my guess (semi-based on historical v8 patch release cycles) is that it'll be 2 weeks after the last minor... so probably looking at next Tuesday or Thursday. 🤷 😀

ronaldbarendse commented 2 years ago

@leekelleher We've identified this issue as a regression and will fix it in 9.3.1 that's indeed scheduled for next Tuesday (and you're also right that we don't release RCs for patches).

Sorry for the inconvenience!

andyneil commented 2 years ago

I can confirm that 9.3.1 does indeed fix this. I updated to the pre-release using the instructions in this blog post to test: https://umbraco.com/blog/umbraco-9-beta-release/

leekelleher commented 2 years ago

@andyneil Thanks for confirming! 👍

AaronSadlerUK commented 2 years ago

I can confirm 9.3.1 fixed this for me 🙂