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.5k stars 2.69k forks source link

Models not generated on PureLive #10220

Closed skartknet closed 3 years ago

skartknet commented 3 years ago

While I was testing #10213 I installed a brand new V9 site and found out that the models are not being generated at all.

On the Models Builder dashboard I can see that the mode is PureLive, but there's nothing being generated on the '~/umbraco/models' folder. The file ood.flag is in the folder and the dashboard says the models are out-of-date.

If I create a new doctype or I re-run the site nothing changes and models are still missing.

This applies to version 9.0.0-beta001.

bergmania commented 3 years ago

Hi @skartknet

Do you have any interesting entries in the log? Normally PureLive works fine, so I guess it has something with your models to do.

skartknet commented 3 years ago

No, nothing on the logs :(

When I make some changes to a doctype I just get this: image

bergmania commented 3 years ago

Interesting.. How is your doctypes setup? Maybe you can export them and add them to this ticket, then I can see if I can reproduce the issue..

Shadyn commented 3 years ago

Just going to throw this out there as I've been having the same issue for a week. If there are doctypes that inherit other doctypes, the parent doctype needs to have a constructor without the publishedValueFallback. This does not get generated currently by modelsbuilder, so it will fail to generate the models (or fail to compile in appdata mode)

image

Once I changed that for all of the parent doctypes, all the models began to work. Not sure where this gets implemented.

skartknet commented 3 years ago

@bergmania false alarm. I thought the models were created when the doctypes are but I have found out that they are generated when a new page using the doctypes is created.