Copied to clipboard

Flag this post as spam?

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


  • Steen Tøttrup 191 posts 291 karma points c-trib
    May 06, 2010 @ 08:00
    Steen Tøttrup
    0

    PackageActions not firing when installing package on local dev server!?

    I'm working on a package for Umbraco, and have some issues. At the moment I've got so far I want to put everything in the package and test the deployment. My problem is that when I install the local package, none of the Actions are triggered. I've made a few custom package actions, and actually wanted to debug those, but they don't trigger and the standard actions don't trigger either. The package should install a new section/application, but nothing happens.

    Has anybody seen this before? I would like to avoid having to actually start debugging the code for the Umbraco cms, so any help would be appriciated!!

    Here's the actions from the package:

    <Action runat="install" alias="addApplication" appName="Documents"
    appAlias="documents" appIcon="documents.gif" />
    <Action
    runat="install" alias="addApplicationTree" silent="false"
    initialize="true" sortOrder="0" applicationAlias="documents"
    treeAlias="doc_Documents" treeTitle="Documents"
    iconOpened="folder_o.gif" iconClosed="folder.gif"
    assemblyName="CreativeMinds.Umbraco.Documents"
    treeHandlerType="LoadDocuments" action="" />
    <Action
    runat="install" alias="addXsltExtension"
    assembly="/bin/CreativeMinds.Umbraco.Documents"
    type="CreativeMinds.Umbraco.Documents.XsltExtensionLibrary"
    extensionAlias="creativeminds.library" />
    <Action runat="install"
    alias="AddTreeNodeType">
    <nodeType
    alias="doc_Documents">
    <header>Documents</header>
    <usercontrol>/documents/createnode.ascx</usercontrol>
    <tasks>
    <delete
    assembly="CreativeMinds.Umbraco.Documents" type="DocumentsTask"
    />
    </tasks>
    </nodeType>
    </Action>
    <Action
    runat="install" alias="MergeUILanguage"
    target="/umbraco/config/lang/en.xml"
    source="/umbraco/documents/install/en.xml" />

    Thanks in advance,

    Steen

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    May 06, 2010 @ 09:12
    Richard Soeteman
    0

    Hi Steen,

    I see that you are also using a few Package Actions which don't come from the Umbraco Core, but from the PackageAction Contrib project which you can find on CodePlex. You need to include this DLL for the AddTreeNodeType. I Assume you wrote the MergeUILanguage Action?

    To debug Package Actions you can download the Package Action Tester package which you find on the PackageAction contrib page. Wehn you installed this package you can test Actions in the developer section.

    Cheers,

    Richard

     

  • Steen Tøttrup 191 posts 291 karma points c-trib
    May 06, 2010 @ 09:51
    Steen Tøttrup
    0

    Hi Richard,

    Thank you for your reply.

    Actually I've made the AddTreeNodeType action myself too, I wasn't aware of the PackageAction Contrib project before you mentioned it.

    I'll try getting your package and try the Tester package and see where that gets me.

    Thanks,

    Steen

     

  • Steen Tøttrup 191 posts 291 karma points c-trib
    May 06, 2010 @ 10:25
    Steen Tøttrup
    0

    Well, the tester installs fine, but like I wrote in the first post, no PackageActions are triggeren, so I guess I have to add the new node in the Developer tree to the database myself.

     

  • Steen Tøttrup 191 posts 291 karma points c-trib
    May 07, 2010 @ 14:43
    Steen Tøttrup
    0

    Well, I found the problem.

    I'm guessing the problem is that when Umbraco probes the assemblies and locates classes with certain interface (i.e. the IPackageAction interface), and then instantiates them, it doesn't make sure the class isn't an abstract class.

    So when I tried making an abstract PackageAction super-class (with the IPackageAction) and let my 2 custom classes inherit from this class, Umbraco couldn't handle actions at all anymore (without any errors in the interface).

    So, don't do that or better, somebody fix that part of the Umbraco code.

    Thanks,

    Steen

Please Sign in or register to post replies

Write your reply to:

Draft