Copied to clipboard

Flag this post as spam?

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


  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Sep 11, 2010 @ 13:42
    Matt Brailsford
    1

    Package Actions Not Uninstalling

    Hi Guys,

    This one is totally doing my head in. For the last couple of packages, I've been unable to provide automated uninstallation due to package actions not firing consistantly.

    I've spent the last couple of days looking into this, and I'm stumped.

    My finding so far are as follows:

    1) Running VS with breakpoints in my package actions Undo methods, none get hit at all
    2) No exceptions are logged in umbracoLog hinting that the actions fail
    3) The last thing logged in umbracoLog is "<Actions>...</Actions>", which suggests it's getting to the foreach loop in umbraco.presentation.developer.packages.installedPackage.confirmUninstall.
    4) I have had some success if I only have 1 package action (in my current package I have 5)

    I've looked through the code, and can't see how it would fail without logging an exception in the umbracoLog table, so can only assume it thinks it has run successfully. The only way I can see this being possible would be as follows:

    1) The "Action" for each loop is returning 0 elements
    2) The list of package actions is empty
    3) Alias names aren't matching

    The fact that none of my Undo methods are triggered suggests it's nothing to do with the package action itself, but there is so much error handling around this area, that I can't see how, other than those listed above, it could continue without logging an issue.

    I've tried downloading and compiling the source, but I'm also having real problems getting that to work to be able to debug (I think it's because I'm using VS2010) so have been unable to narrow it down further.

    Can anybody else suggest anything else that could be causing this to fail? And more importantly a fix? as I really don't like mike packages having to be removed by hand.

    Any help on figuring this one out would be awesome.

    Many thanks

    Matt

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Sep 11, 2010 @ 13:51
    Matt Brailsford
    0

    Codeplex issue here: http://umbraco.codeplex.com/workitem/28829 (Please vote)

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 11, 2010 @ 18:41
    Søren Spelling Lund
    0

    There was an issue with assemblies getting removed before package action before undo was called.

    For uCommerce I had to trick Umbraco by adding a second assembly (called some something like Uninstall.tmp in the manifest) with my custom package actions and then rename (Uninstall.dll) during install to make sure that Umbraco doesn't delete it.

    Not sure if that's still the case.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Sep 11, 2010 @ 18:51
    Matt Brailsford
    0

    I did think about that, but certainly in 4.5.2, the code for deleting the dll's comes after package actions uninstall, so I can't see why that would be the case.

    Matt

  • Comment author was deleted

    Nov 25, 2010 @ 10:07

    Will be fixed in Juno, was indeed the case that the files where deleted before the undo of the package actions (so custom package action wasn't found anymore)

Please Sign in or register to post replies

Write your reply to:

Draft