Copied to clipboard

Flag this post as spam?

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


  • Echilon 29 posts 49 karma points
    Apr 26, 2010 @ 10:29
    Echilon
    0

    Custom Section - Nothing In Tree

    I'm trying to create a custom tree section using the code in the tutorial at http://www.simm.dk/umbraco-corner/articles/making-custom-sections-and-trees-inside-umbraco---part-i.aspx and http://www.geckonewmedia.com/blog/2009/8/3/how-to-create-a-custom-section-in-umbraco-4 , but when I copy the resulting .dll to wwwroot/bin, although I see my section in the control panel, the tree is just a root node which is empty. None of my nodes or pages are shown.

    The full code I'm using is at http://pastebin.com/wMWYdRZz , and I have a 'drivers' section in my wwwroot/umbraco folder into which I've copied the aspx files.

  • Søren Eriksen-Aagreen 29 posts 76 karma points
    Apr 26, 2010 @ 11:08
    Søren Eriksen-Aagreen
    0

    Hi,

    what does your umbracoAppTree table look like ?

    --

    n

     

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Apr 26, 2010 @ 11:13
    Richard Soeteman
    0

    Hi,

    You need to configure the tree in the database also, that was descibed in part II of the Siim.dk blogpost. Yopu find it here http://www.simm.dk/umbraco-corner/articles/making-custom-sections-and-trees-inside-umbraco---part-ii.aspx 

    Cheers,

    Richard

  • Echilon 29 posts 49 karma points
    Apr 26, 2010 @ 11:18
    Echilon
    0

    I did follow the database part, my umbracoAppTree tables looks like this:

    http://img443.imageshack.us/img443/1343/apptree.png

    I also have entries in umbracoApp and umbracoUser2app, which I added using the tutorial at http://www.geckonewmedia.com/blog/2009/8/3/how-to-create-a-custom-section-in-umbraco-4

  • Søren Eriksen-Aagreen 29 posts 76 karma points
    Apr 26, 2010 @ 11:32
    Søren Eriksen-Aagreen
    0

    hmm - looks right - have you restarted the app (touch web.config and save it) ?

  • Echilon 29 posts 49 karma points
    Apr 26, 2010 @ 12:23
    Echilon
    0

    Restarting the app had no effect. :(

  • Søren Eriksen-Aagreen 29 posts 76 karma points
    Apr 26, 2010 @ 14:26
    Søren Eriksen-Aagreen
    0

    Does your umbracoLog say anything ?

  • Echilon 29 posts 49 karma points
    Apr 26, 2010 @ 14:45
    Echilon
    0

    It doesn't seem to be logging control panel events.

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Apr 26, 2010 @ 14:51
    Richard Soeteman
    0

    Check and double check the AssemblyName is inserted in the TreeHandlerAssembly column also Check and double check that the type is inserted in the TreeHandlerType.column. This is case sensitive.

    Cheers,

    Richard

     

  • Echilon 29 posts 49 karma points
    Apr 26, 2010 @ 19:59
    Echilon
    0

    My treeHandlerAssembly is Drivers, treeHandlerType is loadDrivers and my loader looks like this:

    namespace Drivers
    {
        public class loadDrivers : BaseTree
        {
            public loadDrivers(string application)
                : base(application)
            { }

    ...

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Apr 26, 2010 @ 22:04
    Thomas Höhler
    0

    Just add some umbraco logging into the treeHandler to see which part(s) of the code gets touched or not.

    Old style debugging ;-)

    hth, Thomas

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Apr 26, 2010 @ 22:15
    Thomas Höhler
    0

    Oh, saw the table: it seems to be a typo: your class to call is "Drivers.loadDrivers" in the database table the treeHandlerType is set to "drivers.loadDrivers" => as I know it is case sensitive.

    And don't mixup the namespace with the filename of the dll

    I made the same fault million times before ;-)

    hth, Thomas

  • Echilon 29 posts 49 karma points
    Apr 27, 2010 @ 20:39
    Echilon
    0

    For some reason the pages are now showing in the tree, but I'm having probems with UserControls in the Page_Load event in them. If I include my user controls on the custom pages (outside of Umbraco) with

    <%@ Register TagPrefix="mine" TagName="MyUC1" Src="~/UserControls/MyUc1.ascx" %>
    <%@ Register TagPrefix="mine" TagName="MyUC2" Src="~/UserControls/MyUc2.ascx" %>

    Everything works in my Page_Load event which uses server controls in the UCs, but due to Umbraco, if I include them with :

    <%@ Register TagPrefix="mine" Namespace="MyAssembly.UserControls" Assembly="MyAssembly"%>

    I get a null reference exception in the UserControl's Page_Load event (which references an ASP.NET control which is used by the UserControl itself.

    It happens both with and without Umbraco (when the pages to be integrated run outside of Umbraco in their own solution). I've never seen this before having used 99% solely Web Site projects and not Web Applications.

Please Sign in or register to post replies

Write your reply to:

Draft