Copied to clipboard

Flag this post as spam?

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

  • Anton Oosthuizen 190 posts 458 karma points
    Dec 03, 2014 @ 08:35
    Anton Oosthuizen

    Umbraco 7.2 RC GetCurrentMemberProfileModel Null Ref

    HI All I'm getting a null ref error.

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
        Layout = "Admin.cshtml";
        var loginstatusmodel = @Members.GetCurrentLoginStatus();
        var currentmember = @Members.GetCurrentMember();
        var profilemodel = @Members.GetCurrentMemberProfileModel(); << Null Reference Error

    Stack :

    [NullReferenceException: Object reference not set to an instance of an object.]
       Umbraco.Web.Security.MembershipHelper.GetMemberPropertiesViewModel(IMemberType memberType, IEnumerable`1 builtIns, IMember member) +320
       Umbraco.Web.Security.MembershipHelper.GetCurrentMemberProfileModel() +733
       ASP._Page_Views_AdminProfile_cshtml.Execute() in c:\inetpub\wwwroot\uMaster\Views\AdminProfile.cshtml:6
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +279
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +124
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +180
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +139
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +379
       System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +32
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
       System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +240
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
  • Jeroen Breuer 4861 posts 12132 karma points MVP 3x admin c-trib
    Dec 03, 2014 @ 12:42
    Jeroen Breuer


    You can report issues here:


  • Anton Oosthuizen 190 posts 458 karma points
    Dec 03, 2014 @ 12:59
    Anton Oosthuizen

    Thanks I will

  • Logan P. 47 posts 217 karma points
    Dec 03, 2014 @ 15:26
    Logan P.

    I am having the same issue, I just updated to 7.2 RC yesterday to fix a few bugs found in earlier versions of Umbraco and now all of my membership logins are broken. I don't know if this is something that will be fixed before our website launch (January 1), or if I need to downgrade to an earlier version. These Umbraco bugs have really been killing us lately.

  • JP 1 post 22 karma points
    Dec 03, 2014 @ 17:02

    We tracked this down on our end... We had a custom property type (passwordResetToken) that was defaulting to null in the cmsPropertyData table. The code is not checking the PropertyValue.Value property for null in MembershipHelper.GetMemberPropertiesViewModel in the Umbraco.Web.Security namespace (line 420 of the source file)

    Downloading the source and adding the null check, then recompiling and deploying the new dll (umbraco.dll) fixes this for us temporarily. The other option is to go into the cmsPropertyData table and update all the null values for that property type to empty string, but it seems as though the source should be checking for a null value anyways.

  • Josh Olson 79 posts 207 karma points
    Dec 03, 2014 @ 17:15
    Josh Olson

    After updating to 7.2 RC yesterday I also found that quite a few 'updates' to my code needed to be made. Shame on me for being lazy in the original code and assuming an empty string would be returned, but it is still frustrating to have to go back and fix everything... wish that would have been documented as a breaking change or something, just to give us a heads up.

Please Sign in or register to post replies

Write your reply to: