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 Builder -- Models out of date. #10019

Closed NikRimington closed 3 years ago

NikRimington commented 3 years ago

I've just installed the latest Alpha (not the nightly), and set it up with models builder configured as follows:

"ModelsBuilder": {
            "ModelsMode": "AppData",
            "Enable": true,
            "AcceptUnsafeModelsDirectory": true,
            "ModelsDirectory": "../MyDir.Core/Models/Site"
        }

In v7 / v8 when doc types are updated, Models Builder in the back office flags that it is out of date and creates an ood.flag file. This does not appear to be behaving in the same way on v9.

On the alpha it shows this:

image

Is there a missing setting for out of date models to be tracked? Or is this supposed to be working and is currently not?

Nik

bergmania commented 3 years ago

Hi @NikRimington. Thanks for reporting.. As far as I can see in your config, it is not enabled explicitly.

Looks like this was default enabled in v8. That is an error that we will have to change

Can you confirm it works if you use the following config?

"ModelsBuilder": {
            "ModelsMode": "AppData",
            "Enable": true,
            "AcceptUnsafeModelsDirectory": true,
            "ModelsDirectory": "../MyDir.Core/Models/Site",
            "FlagOutOfDateModels": true
        }
bergmania commented 3 years ago

I changed the default value to true (Same as v8) in this commit: https://github.com/umbraco/Umbraco-CMS/commit/fa37ebc1078685a0e5bf70017575b5ad9a95550b

I tested, and now when running AppData-mode my models are marked as out-of-date, when I change/create doc types.