Copied to clipboard

Flag this post as spam?

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


  • Kim Andersen 1447 posts 2197 karma points MVP
    Dec 30, 2009 @ 11:43
    Kim Andersen
    0

    Problem with package action: Allow document type

    I'm trying to move some functionallity from one site to another site using a package. There's a lot of different stuf in it. Some icons, XSLT file, data types, content nodes, document types, macros and templates.

    But when I'm installing the package I get an error. The only problem that occours, is that my document types is not allowed under each other. I tried using the package action: Allow document type but I can't make it work.

     

    Here is what i need. I have a document type called "ContentElementsFolder". Under this document types it shall be possible to create three different documenttypes called: "InfoboxFolder", "FeedboxFolder" and "CategoryFolder".

    And under those three document types another document type should be allowed: Under "InfoboxFolder" a document type called "Infobox" shall be allowed. Under "FeedboxFolder", "Feedbox" shall be allowed and so on.

     

    But how do I write this correctly in the package action.

    I tried this:

    <Action runat="install" alias="allowDocumenttype" documentTypeAlias="FeedboxFolder" parentDocumentTypeAlias="ContentElementsFolder" />

    <Action runat="install" alias="allowDocumenttype" documentTypeAlias="InfoboxFolder" parentDocumentTypeAlias="ContentElementsFolder" />

    <Action runat="install" alias="allowDocumenttype" documentTypeAlias="CategoryFolder" parentDocumentTypeAlias="ContentElementsFolder" />

    <Action runat="install" alias="allowDocumenttype" documentTypeAlias="Category" parentDocumentTypeAlias="CategoryFolder" />

    <Action runat="install" alias="allowDocumenttype" documentTypeAlias="Feedbox" parentDocumentTypeAlias="FeedboxFolder" />

    <Action runat="install" alias="allowDocumenttype" documentTypeAlias="Infobox" parentDocumentTypeAlias="InfoboxFolder" />

     

    But it doesn't work. Am I doing something wrong?

     

    By the way, alle of the templates, files, macros, document types and datatypes is installed correctly. The only thing that's missing is the content nodes because they are not allowed under each other.

    Anyone have a clue?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Dec 30, 2009 @ 13:43
    Dirk De Grave
    1

    Kim,

    Don't see a problem with your code, so bit puzzled as to why the code would not work? Can you check the umbracoLog table either directly in db or through the excellent Log Manager for some specific installation entries?

     

    Cheers,

    /Dirk

     

  • Kim Andersen 1447 posts 2197 karma points MVP
    Dec 30, 2009 @ 14:29
    Kim Andersen
    0

    I installed the Log Manager package, and then tried to install my own package again. This is the error that I get in the Log:

     

    At /umbraco/developer/packages/installer.aspx?installing=businesslogic&dir=D:\Data\web\Umbraco\4.0.2.1\UmbracoPackage\data\c25c6a35-283c-4762-8416-3a028b69f74a&pId=7 (Referred by: http://package.ws-ka/umbraco/developer/packages/installer.aspx): System.NullReferenceException: Object reference not set to an instance of an object. at umbraco.cms.businesslogic.packager.Installer.InstallBusinessLogic(Int32 packageId, String tempDir) at umbraco.presentation.developer.packages.Installer.processInstall(String currentStep) at umbraco.presentation.developer.packages.Installer.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at umbraco.BasePages.BasePage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Dec 30, 2009 @ 14:31
    Sebastiaan Janssen
    0

    Looks like there might be a typo in one of your alias names, have a look at the upper/lower-casing as well.

  • Kim Andersen 1447 posts 2197 karma points MVP
    Dec 30, 2009 @ 14:52
    Kim Andersen
    0

    I just looked at my aliases once more, and copy/pasted them into the package action, but I still get the error:

     

    At /umbraco/developer/packages/installer.aspx?installing=businesslogic&dir=D:\Data\web\Umbraco\4.0.2.1\UmbracoPackage\data\fb956e14-69c6-4f3d-ba1a-0cb5733592ca&pId=7 (Referred by: http://package.ws-ka/umbraco/developer/packages/installer.aspx): System.NullReferenceException: Object reference not set to an instance of an object. at umbraco.cms.businesslogic.packager.Installer.InstallBusinessLogic(Int32 packageId, String tempDir) at umbraco.presentation.developer.packages.Installer.processInstall(String currentStep) at umbraco.presentation.developer.packages.Installer.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at umbraco.BasePages.BasePage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

     

    In two of my aliases i have square brackets ([ ]). They actually looks like this:

    <Action runat="install" alias="allowDocumenttype" documentTypeAlias="[K]Feedbox" parentDocumentTypeAlias="FeedboxFolder" />

    <Action runat="install" alias="allowDocumenttype" documentTypeAlias="[K]Infobox" parentDocumentTypeAlias="InfoboxFolder" />

    is that a problem?

    (I also included the correct aliases for those two, just didn't write them in my first post in here because the aliases were on danish, but with no weird danish characters)

     

    Or does it have something to do with spaces in the aliases? And just to be 100% clear. It's the document type alias I need to use right? Not the name or anything weird.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Dec 30, 2009 @ 15:05
    Dirk De Grave
    0

    Yes, I've checked that in code, you need the alias of the doc type, that's for sure. I don't think those brackets could be the issue, but it wouldn't hurt to trial and error without, wouldn't it? Probably not what you'd want to hear, but best is to exclude all 'noise' to verify whether that could be the issue.

    Let us know what you find out.

    Cheers,

    /Dirk

  • Kim Andersen 1447 posts 2197 karma points MVP
    Dec 30, 2009 @ 19:48
    Kim Andersen
    0

    I'll try it out in the new year. And report back on what I find out.

    Happy new year to all of you so far :)

  • 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