Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jul 08, 2010 @ 13:29
    Ismail Mayat
    2

    Package action uninstall

    Guys,

    I am using http://our.umbraco.org/wiki/reference/packaging/package-actions/community-made-package-actions/execute-an-sql-statementscript which works fine it inserts 2 rows into cmsMacroPropertyType table.  Do I also need to create an uninstall action for the package that removes the inserted rows on uninstall?

    regards

    Ismail

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jul 08, 2010 @ 13:32
    Matt Brailsford
    0

    I don't know, but would like to know the answer myself.

    Good question

    Matt

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Jul 08, 2010 @ 13:37
    Warren Buckley
    2

    It is good practise to do so. However I am not entirely sure that that particular package action supports the Undo/uninstall.

    OK just took a quick look at the source code - http://packageactioncontrib.codeplex.com/SourceControl/changeset/view/47778#597529

    It seems like you need to create a sperapte action that has the uninstall SQL statement in.

    <Action runat="uninstall" undo="false" alias="ExecuteSql"></Action>

    Warren

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jul 08, 2010 @ 13:46
    Ismail Mayat
    0

    Warren,

    Tried that however the uninstall script didnt run my action looks like

    <Action runat="uninstall" undo="false" alias="ExecuteSql">
    <![CDATA[
    delete from cmsMacroPropertyType where macroPropertyTypeRenderAssembly='Cogworks.PDFGenUmbracoExtensions';
    ]]>
    </Action>

    regards

    Ismail

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Jul 08, 2010 @ 13:49
    Warren Buckley
    0

    Hmm I am only going on what the source code comment suggested Ismail.
    However keep me posted on this as I would be interested to hear how it turns out.

    Warren

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 08, 2010 @ 13:55
    Dirk De Grave
    0

    Ismail, 

    Can you check whether the uninstall action made it to the xml that gets created when installing the package. Generated xml should contain your action, otherwise it will never be fired. If it's not there... it's a bug, if it's there and didn't fire... well, it's a bug.

    Did you find some errors in the umbracoLog table?

    Cheers,

    /Dirk

  • asim 16 posts 36 karma points
    May 23, 2011 @ 12:05
    asim
    0

    Hi all

    i also have the same problem on package action Uninstall

    here is my package action uninstall

     <Action runat="uninstall" undo="false" alias="ExecuteSql"><![CDATA[
    delete from umbracoUser2app where app = 'custom' ]]></Action>

    is there any way to execute that sql script

    Thanks

    Asim

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    May 23, 2011 @ 12:11
    Richard Soeteman
    0

    Hi Asim,

    Remove the undo=true attribute. If the dll is still in memory during uninstall it will be executed.If the dll is already deleted than the action can't be found and the package action will fail to uninstall also.

    Cheers,

    Richard

     

  • asim 16 posts 36 karma points
    May 23, 2011 @ 12:18
    asim
    0

    Thanx Richard

    but  how i know that dll for user control is deleted first before execute Package action Uninstall.

    actually when uninstall  if first confirms the files to be delete, including dll from bin + user control files

    cheers,

    Asim

Please Sign in or register to post replies

Write your reply to:

Draft