Copied to clipboard

Flag this post as spam?

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


  • Aaron 4 posts 53 karma points
    Aug 15, 2014 @ 11:39
    Aaron
    0

    Links to Child Nodes not Working

    I am new to Umbraco so bare with me. My problem lies in creating new pages or 'nodes'. The root node/home page works fine. I created a document type and allowed it at the root. Created a master template for the site wide stuff like header and footer and a home page template for content on the home page as well as stylesheets. I then created the Home node in the root of Content and it works fine.

    Now; whenever I try to create a child node of the Home node, it doesn't seem to want to work properly. I create the document type and templates as before, allow it as a child of the home document type and then create the node under Home in the Content dashboard and publish.

    It appears fine in the tree, just I cannot seem to access it. I click on preview and get the error:

    "System.InvalidOperationException: The value of parameter 'id' must be either a string or an integer"

    With the line of code containing "@Umbraco.Field("pageName")" highlighted. I then try to access the page using its link in properties (e.g. /departments/) with still no luck. I then try adding the home root to the URL like /home/departments/ and the page does show up, however the page name displayed is "Home".

    What is going on? It's like Umbraco creates the nodes is referencing them wrong, Any help would be appreciated.

    Thanks,

    Aaron

  • Jeavon Leopold 3074 posts 13631 karma points MVP 11x admin c-trib
    Aug 15, 2014 @ 22:46
    Jeavon Leopold
    0

    Hi Aaron,

    Could you please post a screenshot of your fully expanded content tree for me and also the code from the template of your child node?

    Jeavon

  • Aaron 4 posts 53 karma points
    Aug 21, 2014 @ 16:13
    Aaron
    100

    Hi Jeavon,

    I have managed to get around the problem now, it seemed like a bit of a bug but if no one else is experiencing it then fair enough.

    Basically, when I created nodes and their document types/templates individually (set up the Home document type and template and then create the node, and then repeat with the next page etc.), Umbraco seemed to lose track of where they were, however when I tried making the majority of document types and templates first and then create the nodes after, it seemed to work.

    A bit of an odd one although it didn't just happen once, I tried fresh projects with new Umbraco installs but it kept happening. Maybe it's something to do with setting up the relationships (structure tab in the document type) first before creating the page nodes.

    Anyway, working now, thanks!

  • Dylan Archer 1 post 21 karma points
    Sep 25, 2014 @ 19:51
    Dylan Archer
    0

    You just saved me, was having the exact same issue where the child nodes weren't displaying. I thought it was an install issue. Thanks for clarifying this for me.

Please Sign in or register to post replies

Write your reply to:

Draft