Copied to clipboard

Flag this post as spam?

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


  • Lee 1130 posts 3088 karma points
    Feb 20, 2011 @ 09:18
    Lee
    0

    Add New Tree Action Not Working?

    I have the following Action XML in my package installer, and the attribute values are exactly the same values as I have in the database on my working version.

    But when you install the package, the tree is not added into the database?  What am I doing wrong?

      <Actions>
        <Action runat="install" alias="addMassReplacer" silent="false" initialize="true" sortOrder="9" applicationAlias="developer" treeAlias="massReplacer" treeTitle="Mass Replacer" iconOpened="legacy" iconClosed="legacy" assemblyName="MassReplacer" treeHandlerType="loadMassReplacer" action="" />
      </Actions>
  • Daniel Bardi 927 posts 2562 karma points
    Feb 20, 2011 @ 09:30
    Daniel Bardi
    0

    Do you have a class in your package that uses the IPackageAction interface?

  • Lee 1130 posts 3088 karma points
    Feb 20, 2011 @ 09:34
    Lee
    0

    No, I didn't realise I needed to for this?

  • Daniel Bardi 927 posts 2562 karma points
    Feb 20, 2011 @ 09:40
    Daniel Bardi
    0

    To use a custom packageaction, you need to include the class using IPackageAction within your package... it can be compiled within the package assembly or a seperate assembly.. as long as it's available to umbraco.

    PackageActions are run after the assemblies are copied to the bin.

     

  • Lee 1130 posts 3088 karma points
    Feb 20, 2011 @ 09:52
    Lee
    0

    I was under the impression if I used the <Action> tag in the package installer Umbraco would just pick it up??  

    I have been looking at the Robots.txt editor package on Google code (Link below) which adds a tree exactly as I need and that has no reference to IPackageAction? Yet it installs into the database?

    http://code.google.com/p/robotstxt-editor-for-umbraco/source/browse/#svn%2Ftrunk%2Fumbraco%2Frobots-txt

    I have almost identical code to Lee's above, including the package XML?

  • Daniel Bardi 927 posts 2562 karma points
    Feb 20, 2011 @ 09:57
    Daniel Bardi
    0

     

    I re-read your post... you are trying to add a new tree... change the alias to "addApplicationTree"

    http://our.umbraco.org/wiki/reference/packaging/package-actions/add-application-tree

    Thought it was custom becuause of the alias you posted.

     

  • Lee 1130 posts 3088 karma points
    Feb 20, 2011 @ 09:59
    Lee
    0

    Hmmm ok this officially doing my nut...  Do you have an example of some code using IPackageAction?

  • Daniel Bardi 927 posts 2562 karma points
    Feb 20, 2011 @ 10:00
    Daniel Bardi
    0

    Look at my previous post... I realized you don't need that... you're just adding a tree.  Change alias to "addApplicationTree"

  • Lee 1130 posts 3088 karma points
    Feb 20, 2011 @ 10:08
    Lee
    0

    Damn... Can't beleive I missed that :)  Cheers all working now!!

  • Daniel Bardi 927 posts 2562 karma points
    Feb 20, 2011 @ 10:13
    Daniel Bardi
    0

    Awesome... :)...  I've been there before..

  • 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