Copied to clipboard

Flag this post as spam?

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


  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Feb 02, 2011 @ 16:47
    Tim
    0

    Null Reference on user permissions

    Hi,

    I have a site that I've upgraded from 4.0.4 to 4.5.2 and I'm getting a null reference exception when I try and load the user permissions editor. Here's the stack trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.cms.presentation.user.PermissionEditor.OnInit(EventArgs e) +155
       System.Web.UI.Control.InitRecursive(Control namingContainer) +132
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1953
    

    I'm not sure what the error is, haven't changed anything in the user permissions, and didn't have anything set in there before the upgrade. Anyone come accross this one before?

    Cheers,

    Tim.

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Feb 04, 2011 @ 12:49
    Tim
    0

    More fiddling has revealed the following:

    • there are two problems at work here, the first is that the user doesn't seem to be getting passed through to the to the NodePermissions User control, not sure why, as all the variables seem to be correct, if I hard code the user id into the user control it loads the page
    • secondly, PermissionsEditor.js file is throwing an error that "umbraco is undefined", not sure why, nowhere else in the CMS does this

    Anyone got any ideas what could be causing either of these? The second one is the one I'm most interested in sorting!

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Feb 04, 2011 @ 17:08
    Tim
    0

    Sorted! The issue is to do with having a custom content tree. It worked in 4.0.x, but in 4.5. The permissions editor looks like it has a hard coded reference to the default content class, which breaks when you're using a custom class instead of the default one (throwing the null reference exception). For now, I've had to disable my custom class (all it was doing was ustomizing the root node to remove the create button from the "Content" folder, after some of the client's users tried adding content there instead of under the home page).

    Have logged it in codeplex: http://umbraco.codeplex.com/workitem/29998 with repro if anyone runs into the same issue!

    :)

Please Sign in or register to post replies

Write your reply to:

Draft