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.42k stars 2.67k forks source link

BlockListModel not populating from Composition #15767

Closed cornehoskam closed 6 months ago

cornehoskam commented 6 months ago

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

13.1.1

Bug summary

Hi! After messing about with BlockLists I stumbled upon the problem that when a BlockList comes from a Composition, the ModelsBuilder generated model doesn't work/doesn't contain the items from the BlockList in the BlockListModel (See screenshot). Removing the composition and setting the exact same property, alias & data type on the document type itself instead of via a composition does set the various models correctly!

afbeelding

Specifics

No response

Steps to reproduce

  1. Create a document type with a BlockList editor. (e.g. BlockListComposition)
  2. Create another document type that is a composition of the first document type. (e.g. ContentPage)
  3. Generate your modelsbuilder models (I'm using SourceCodeManual)
  4. Create your page and add 1 or more items to your blocklist.
  5. Create a RenderController for your Content Page
  6. Notice that the corresponding BlockListModel contains 0 elements.
  7. Set the exact same properties from step 1 directly on the ContentPage instead of via a composition.
  8. Notice that the corresponding BlockListModel contains 1 or more elements

Expected result / actual result

The expected result would be that the BlockListModel contains the right elements, whether the property is set on the Modelsbuilder Model via a composition or not!

github-actions[bot] commented 6 months ago

Hi there @cornehoskam!

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:

elit0451 commented 6 months ago

Hi @cornehoskam 👋

Thanks for reaching out. I tried to follow your setup but in my case, I have the block elements populated even in the SourceCodeManual mode. Have a look at this video, maybe you can spot what I am doing wrong:

https://github.com/umbraco/Umbraco-CMS/assets/21998037/729e4d09-7e56-449e-9cf4-260f783a1a4c

cornehoskam commented 6 months ago

Hi @elit0451!

Thank you for getting back to me! Oddly enough I don't seem to be able to replicate it either anymore. My first guess would have been that it had something to do with the fact that you are using Umbraco 13.2.0 and I was using 13.1.1, but after just having created two new empty environments with both 13.2.0 & 13.1.1 and configuring the the exact same setup, it all seems to work just as intended & expected! 😅

I'll close the issue for now, until I happen to run into it again in the future! Thanks anyway! 🙂