Copied to clipboard

Flag this post as spam?

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


  • gabri 14 posts 24 karma points
    Dec 31, 2011 @ 17:43
    gabri
    0

    Node.GetCurrent() gives null error after upgrade

    Hi Everyone,

    I just did an Umbraco upgrade from 4.0.2.1 to 4.7.1 by following the steps in http://our.umbraco.org/wiki/install-and-setup/upgrading-an-umbraco-installation. At first glance that seemed to work well, but my custom usercontrols don't work anymore because this line of code:

    Node currentNode = Node.GetCurrent();

    ...suddenly throws this error:

    Current node is null. This might be due to previewing an unpublished node. As the NodeFactory works with published data, macros using the node factory won't work in preview mode.
    Parameter name: Current node is 24576

    I also noticed that when I look at content via the backend page (/umbraco/umbraco.aspx#content), every page shows a "#" character instead of a URL on the "Link to document" field. My guess is that both these issues have the same root cause, but what it is, no idea.

    Anyone who has a hunch as to how I can fix this?

    Cheers,

    Gabri

     

     

  • Rich Green 2246 posts 4008 karma points
    Dec 31, 2011 @ 20:20
    Rich Green
    0

    Hey,

    Did you republish all your content?

    Rich

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Dec 31, 2011 @ 21:42
    Sebastiaan Janssen
    0

    You will probably need to follow these steps to complete the upgrade: http://our.umbraco.org/wiki/reference/xslt/45-xml-schema/switching-between-old-and-new-schema

  • gabri 14 posts 24 karma points
    Jan 02, 2012 @ 19:43
    gabri
    0

    Hey guys,

    Thanks for your help, republishing my content fixed the problem.

    And unpublished content is still unpublished afterwards, so it works pretty well :-)

    Cheers,
    Gabri

     

Please Sign in or register to post replies

Write your reply to:

Draft