Copied to clipboard

Flag this post as spam?

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


  • Nicholas Westby 2054 posts 7104 karma points c-trib
    Apr 14, 2023 @ 17:54
    Nicholas Westby
    1

    Unable to Upgrade to Umbraco 8.18.7 Due to "Broken composer dependency" Error From uSync-Related Code

    See here for a full discussion: https://github.com/umbraco/Umbraco-CMS/issues/14066

    In short, I'm on Umbraco 8.18.5 and have various uSync packages installed (linked ticket mentions versions) and was unable to upgrade to Umbraco 8.18.7 due to an error that says "Broken composer dependency". At one point, I also tried upgrading all the uSync dependencies to the most recent supported on Umbraco 8, but that resulted in the same error.

    It seems like the issue originates from this class in my code:

    [ComposeAfter(typeof(uSyncPublishComposer))]
    public class Composer : IComposer
    {
        public void Compose(Composition composition)
        {
            /* Removed probably irrelevant code. */
        }
    }
    

    A workaround was to add a RuntimeLevel attribute like this:

    [RuntimeLevel(MinLevel = RuntimeLevel.Run)]
    [ComposeAfter(typeof(uSyncPublishComposer))]
    public class Composer : IComposer
    {
        public void Compose(Composition composition)
        {
            /* Removed probably irrelevant code. */
        }
    }
    

    I'm curious why adding this attribute seemed to be necessary to run the upgrade. I took at look at uSyncPublishComposer and all the ancestors (based on the ComposeAfter relationship) and didn't see RuntimeLevel specified on any of those, and so I wouldn't think it would be necessary on my composer either.

  • Kevin Jump 2348 posts 14896 karma points MVP 9x c-trib
    Apr 14, 2023 @ 22:25
    Kevin Jump
    101

    Hi,

    I think IUserComposer in V8 has the runtime level restriction on it so that's where it is coming from.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies