Copied to clipboard

Flag this post as spam?

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


  • Levente Kosa 136 posts 352 karma points
    Feb 19, 2020 @ 11:40
    Levente Kosa
    0

    Error on live environment

    Hi,

    I just released my local website. Back-office is available, but on frontend I got this message: enter image description here

    Should I modify something in live environment? My Umbraco version is 8.5.3.

    Thanks in advance!

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Feb 19, 2020 @ 11:53
    Kevin Jump
    0

    Hi,

    You should try rebuilding the sites models in the models builder tab in the settings dashboard. Assuming you can see all the the DocTypes and settings in the bakc office ?

  • Levente Kosa 136 posts 352 karma points
    Feb 19, 2020 @ 11:55
    Levente Kosa
    0

    Hi Kevin,

    Thanks for the reply. I just checked Models Builder tab and I can see an error message: Failed to build PureLive models.

    g:\pleskvhosts\foobar\httpdocs\App_Data\Models\all.generated.cs(75): error CS1002: ; expected
    
    at System.Web.Compilation.AssemblyBuilder.Compile()
    at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
    at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
    at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
    at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
    at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
    at System.Web.Compilation.BuildManager.GetCompiledAssembly(String virtualPath)
    at Umbraco.ModelsBuilder.Umbraco.PureLiveModelFactory.GetModelsAssembly(Boolean forceRebuild) in D:\d\Zbu ModelsBuilder\src\Umbraco.ModelsBuilder\Umbraco\PureLiveModelFactory.cs:line 447
    at Umbraco.ModelsBuilder.Umbraco.PureLiveModelFactory.EnsureModels() in D:\d\Zbu ModelsBuilder\src\Umbraco.ModelsBuilder\Umbraco\PureLiveModelFactory.cs:line 283
    
  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Feb 19, 2020 @ 11:58
    Kevin Jump
    0

    Odd :( - maybe removing the app_data/models folder, and asking it to rebuild (maybe it got corrupt?)

    Again assuming you've not added anything to that folder yourself?

  • Levente Kosa 136 posts 352 karma points
    Feb 19, 2020 @ 12:05
    Levente Kosa
    0

    I removed the folder, after pressing Reload button on the tab didn't generated the folder again, so I restarted the site. Folder came back, but with the same error on Models Builder :(

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Feb 19, 2020 @ 12:08
    Kevin Jump
    0

    Sorry, not a models builder person :(

    It might be worth seeing what is on line 75 of that file - it might be a property name or something ??

  • Levente Kosa 136 posts 352 karma points
    Feb 19, 2020 @ 12:08
    Levente Kosa
    0

    ...I can see doctypes, everything

  • Levente Kosa 136 posts 352 karma points
    Feb 19, 2020 @ 12:15
    Levente Kosa
    0

    As you can assume, I'not an expert of this, but I can see this (row 70-79):

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.1.0")]
    public new const string ModelTypeAlias = "base";
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.1.0")]
    public new const PublishedItemType ModelItemType = PublishedItemType.Content;
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.1.0")]
    public new static IPublishedContentType GetModelContentType()
        => PublishedModelUtility.GetModelContentType(ModelItemType, ModelTypeAlias);
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.1.0")]
    public static IPublishedPropertyType GetModelPropertyType<TValue>(Expression<Func<Base, TValue>> selector)
        => PublishedModelUtility.GetModelPropertyType(GetModelContentType(), selector);
    

    So this is row 75:

    public new static IPublishedContentType GetModelContentType()
    
  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Feb 19, 2020 @ 12:18
    Kevin Jump
    1

    Yeah that looks ok to me

    Sorry i can't help more. :(

    I think it might be a good idea to open a new question on the forum - specifically on the models builder error, it might attract some people with a bit more experience you know how to fix it.

  • Levente Kosa 136 posts 352 karma points
    Feb 19, 2020 @ 12:32
    Levente Kosa
    0

    It's ok, thanks anyway. One last thing, which may can be relevant.

    It's a shared hosting, and it was an error before (couldn't access to back-office), so the support team commented out compilers within system.codedom, like this:

    <system.codedom>
        <!--compilers>
          <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:7 /nowarn:1659;1699;1701" />
          <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
        </compilers!-->
      </system.codedom>
    
  • Levente Kosa 136 posts 352 karma points
    Feb 19, 2020 @ 15:41
    Levente Kosa
    101

    Hi,

    It turned out it caused by this removed compiler (thanks GoDaddy shared hosting).

    Unfortunately they have a policy: "This program is blocked by group policy. For more information, contact your system administrator" and the compiler content needs to be removed.

    After that I had to change Umbraco.ModelsBuilder.ModelsMode from PureLive value to AppData and remove

  • Refaat Arean 1 post 71 karma points
    Oct 11, 2022 @ 09:15
    Refaat Arean
    0

    Hi Levente I have the Same Problem but I couldn't understand your solution. Could you please give me the steps?

Please Sign in or register to post replies

Write your reply to:

Draft