Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Frederik Lundbeck Jørgensen 3 posts 73 karma points
    Apr 04, 2022 @ 09:25
    Frederik Lundbeck Jørgensen
    0

    Modelsbuilder stopped working

    Since upgrading from 9.3.1 to 9.4.1 our modelsbuilder has stopped working. When we make a change in the settings tab it doesn't display the 'Out-of-date' flag any longer. It even says that 'Tracking of out-of-date models is not enabled.', even though our 'ModelsBuilder' section in the appsettings.json configuration is as follows:

    "ModelsBuilder": {
        "ModelsMode": "SourceCodeManual",
        "ModelsNamespace": "Folketeatret.Models",
        "ModelsDirectory": "~/../Folketeatret.Models/Generated",
        "AcceptUnsafeModelsDirectory": true,
        "FlagOutOfDateModels": true
      }
    

    I also suspect this error may be causing other weird problems such as some generated models not being populated with data correctly. An example of this is a 'Cta' generated model that has a 'UrlPicker' property that for some reason is always null, even though we've set the link in the content tree.

    Would love to hear from somebody who's experienced this or knows how to fix it.

  • Corné Hoskam 72 posts 552 karma points MVP c-trib
    Apr 04, 2022 @ 09:40
    Corné Hoskam
    0

    Hi Frederik,

    Perhaps a helpful starting point would be to add an additional key-value pair to your appsettings.json for 'ModelsBuilder.DebugLevel', with an int value greater than zero to enable detailed logging on the ModelsBuilder. Maybe that will shed a light on what's going wrong with the ModelsBuilder!

    If nothing shows up, we'll have to continue looking for other solutions to found out what's going wrong!

    Kind regards,

    Corné Hoskam

  • Frederik Lundbeck Jørgensen 3 posts 73 karma points
    Apr 04, 2022 @ 10:57
    Frederik Lundbeck Jørgensen
    0

    Hi Corné,

    Thanks for the quick response. I tried adding the ModelsBuilder.DebugLevel with 1 as the value to the appsettings. Do you know where the supposed logging/debugging will be shown, I can't seem to find any logging happening?

  • Chester Campbell 98 posts 208 karma points
    May 05, 2022 @ 14:28
    Chester Campbell
    0

    I am experiencing this issue as well. I'm developing a site using Umbraco CMS v9.4.3 and my models builder configuration is:

    "ModelsBuilder": {
        "ModelsMode": "SourceCodeManual",
        "ModelsNamespace": "MyProject.Models.PublishedContent",
        "ModelsDirectory": "~/Models/PublishedContent/Generated",
        "FlagOutOfDateModels": true,
        "DebugLevel": 1
      }
    

    In the CMS --> Settings --> Models Builder tab I'm seeing this:

    Models Builder
    Version: 9.4.3+192eb2699ba4131addbb08236f60eb031707f751
    
    ModelsBuilder is enabled, with the following configuration:
    
    The models mode is 'SourceCodeManual'. Strongly typed models are generated on demand. Recompilation is necessary and models are available to all CSharp code.
    Models namespace is MyProject.Models.PublishedContent.
    Tracking of out-of-date models is not enabled.
    

    I have not noticed any problems with the content of the generated models (so far), but the interface clearly doesn't represent my configuration properly.

    I looked for logging in the Log Viewer but there's nothing there related to models builder.

  • Rob Schall 3 posts 72 karma points
    Jun 03, 2022 @ 02:10
    Rob Schall
    0

    Has there been any movement on this issue? I'm seeing the same issue on the latest version of Umbraco (9.5.1) and have been seeing it for several versions now.

    Version: 9.5.1+406576ddfa7f3577d959a32ec2296bd9f730786e
    
    ModelsBuilder is enabled, with the following configuration:
    
    The models mode is 'SourceCodeManual'. Strongly typed models are generated on demand. Recompilation is necessary and models are available to all CSharp code.
    Models namespace is Umbraco.Cms.Web.Common.PublishedModels.
    Tracking of out-of-date models is not enabled.
    

    And here's the appsettings:

      "ModelsBuilder": {
        "ModelsMode": "SourceCodeManual",
        "FlagOutOfDateModels": true,
        "Enable": true,
        "DebugLevel": 1
      },
    

    We are using uSync which I know flags changes as well to models. Could it be possible that could be involved here? Is anyone else having this issue also utilizing uSync?

  • Lotte Pitcher 49 posts 242 karma points MVP 6x c-trib
    Jun 07, 2022 @ 20:25
    Lotte Pitcher
    0

    Have encountered this problem myself, in that ood.flag is not being created when in SourceCodeManual mode.

    It was mentioned in a meetup tonight (https://www.meetup.com/umbracalong/) and a pull request has been raised as a potential fix for the problem... Suggest you follow: https://github.com/umbraco/Umbraco-CMS/pull/12548

Please Sign in or register to post replies

Write your reply to:

Draft