Copied to clipboard

Flag this post as spam?

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


  • Sergey Selutin 2 posts 22 karma points
    Jan 20, 2015 @ 13:06
    Sergey Selutin
    0

    Can't subscribe to package/extraction event in 2.11 version

    Hi all. I use Umbraco 7.2.1 and now installed last version of Courier(2.11).

    To hook packaging items procedure previously, In 2.5 version(for Umbraco 6) I used following approach:

    DataTypeProvider.Instance().Packaged += Packaged;

    In my Packaged method I skipped data type items that shouldn't be ovewritten on target environment.

    In new version of Courier I can't use this approach, cause DataTypeProvider.Instance() doesn't exist. I tried to take DataTypeProvider instance from providers collection ProviderModel.ItemProviderCollection.Instance and subscribe on Packaged event, but it didn't fire.

    As 2-nd approach I implemented custom data resolver and overrided ResolvableTypes, ShouldExecute, Packaging as described here https://github.com/umbraco/Courier/blob/master/Documentation/Developer%20Documentation/Data%20Resolvers.md

    It fires, but items are still in package.

    I'll appreciate if somebody can share how can I hook up packaging/extraction procedure in new courier.

    Thanks in adnvance!

  • Sergey Selutin 2 posts 22 karma points
    Jan 22, 2015 @ 09:10
    Sergey Selutin
    0

    Update: Problem is solved using following assignment:

    PackagingManagerEvents.PackagingItem += PackagingManagerEventsOnPackagingItem

  • 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