Copied to clipboard

Flag this post as spam?

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


  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Apr 01, 2022 @ 12:16
    Nik
    0

    Running uSync in Azure fails, but running locally works

    Hey Kevin,

    I don't know if this is being caused by uSync or by Umbraco, but I'm deploying a site to Azure and when I run uSync it is failing against DataTypes and Content Types. No details are being logged, just that the handlers failed.

    The same files import fine on a local DB, so it appears to be something around Azure causing the issue but I'm not sure what.

    Running: uSync: 9.2.0 Umbraco: 9.3.1

    enter image description here

    As you can see some items import fine. There are no errors in the Umbraco logs, despite the site being set on "Debug" logging in this environment. I can see the debug entries from uSync showing.

    When I report changes, these are some of the changes I'm seeing:

    enter image description here

    What makes it really odd, having checked some of the content types, they have imported:

    enter image description here

    Most, not all, of these content types are IPublishedElements - but I'm wondering if the issue is related to the tabs/groups?

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Apr 01, 2022 @ 12:53
    Kevin Jump
    0

    Hi Nik,

    are you publishing compiled razor viewss ?

    e.g do you have this ?

        <RazorCompileOnBuild>false</RazorCompileOnBuild>
        <RazorCompileOnPublish>false</RazorCompileOnPublish>
    

    that can cause the templates to fail, wondering if its that.

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Apr 01, 2022 @ 13:18
    Nik
    0

    Hey Kevin,

    I have

     <!-- Set this to true if ModelsBuilder mode is not InMemoryAuto-->
    <PropertyGroup>
        <RazorCompileOnBuild>false</RazorCompileOnBuild>
        <RazorCompileOnPublish>false</RazorCompileOnPublish>
    </PropertyGroup>
    

    Which I think "doesn't" publish compiled views is that right?

    Also have this:

    <PropertyGroup>
        <CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
    </PropertyGroup>
    
  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Apr 01, 2022 @ 13:37
    Kevin Jump
    0

    Yeah - that should mean the files are there.

    Just rechecking the all fails should at least log a warning in the logs. 🤔

    I am guessing you don't have anything listening for the uSync notification events ?

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Apr 01, 2022 @ 13:45
    Kevin Jump
    0

    OK, sorry i read your version numbers the wrong way around, 🙂

    i uSync 9.3.1 all fails will log, (and there is a popup for exceptions) and they should be a lot better, i can't quite remember with v9.2 i will have to examine the source, but i am guessing we hadn't caught them all.

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Apr 01, 2022 @ 15:17
    Nik
    0

    So.

    I've upgrade uSync to the latest version 9.3.2 :-D

    This is giving an error I can actually feedback now!

    Set an alias before adding the property group.
       at Umbraco.Cms.Core.Models.PropertyGroupCollection.Add(PropertyGroup item)
       at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeCommonRepository.MapGroupsAndProperties(IDictionary`2 contentTypes)
       at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeCommonRepository.GetAllTypesInternal()
       at Umbraco.Extensions.AppCacheExtensions.<>c__DisplayClass0_0`1.<GetCacheItem>b__0()
       at Umbraco.Cms.Core.Cache.SafeLazy.<>c__DisplayClass1_0.<GetSafeLazy>b__0()
    

    The items in question don't have a tab on them so are falling back to the default tab from what I can tell.

    Nik

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Apr 01, 2022 @ 15:38
    Nik
    101

    Okay, so it looks like it's an issue with the old uSync definition files.

    The ones that fail have:

    <Tab>Content</Tab>
    

    If I re-save a failing item after making sure it works okay that changes to:

    <Tab Alias="values/content">Content</Tab>
    

    It also changes the "Tab" definition from:

    <Tabs>
    <Tab>
      <Caption>Content</Caption>
      <SortOrder>0</SortOrder>
    </Tab>
    

    to

    <Tabs>
    <Tab>
      <Key>##REDACTED-GUID##</Key>
      <Caption>Content</Caption>
      <Alias>values/content</Alias>
      <Type>Group</Type>
      <SortOrder>0</SortOrder>
    </Tab>
    

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Apr 01, 2022 @ 16:01
    Kevin Jump
    0

    Oh good spot,

    i wasn't actually aware we changed that that much in v9 did these uSync files come from an old v8 site or where they generated on v9 in the first place ?

    in v9.3.x the feedback dialog exists because you asked for it 🙂

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Apr 01, 2022 @ 16:03
    Nik
    0

    H5YR for the feedback dialog! Was super helpful!

    I actually am not sure where they originated from.

    I think they started on a v8 site but after first import into a clean v9 I was sure I'd exported again to get any changes.

    If they did come from a v8 site, it was probably around a v8.6 site so well before tabs existed.

Please Sign in or register to post replies

Write your reply to:

Draft