Copied to clipboard

Flag this post as spam?

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


  • IanS 22 posts 65 karma points
    Sep 09, 2014 @ 17:44
    IanS
    0

    CurrentPage is null on some pages

    I have a strange problem that on some of the pages off my site, "CurrentPage" is null and I get an error "Cannot perform runtime binding on a null reference" if I try and access any dynamic properties.  On some other pages it works fine though.  I can't see any difference between thet pages it works on and the ones that it doesn't.

    I'm using umbraco 7.1.4 and this is on a standard razor template (not a marco partial) that begins with @inherits Umbraco.Web.Mvc.UmbracoTemplatePage

    Any idea why?

    Thanks

     

     

     

  • IanS 22 posts 65 karma points
    Sep 10, 2014 @ 11:42
    IanS
    0

    Ok, I've solved this.  It's because I had a controller with the same name and it was using that instead of UmbracoTemplatePage.

    More details here: http://our.umbraco.org/documentation/Reference/Mvc/custom-controllers

     

  • Charles Afford 1163 posts 1709 karma points
    Sep 14, 2014 @ 21:03
    Charles Afford
    0

    Thanks janS :)

  • 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