U4-9857 - Umbraco 7.6 - Exception after changing user login name

Created by Jeavon Leopold 04 May 2017, 17:34:11 Updated by Sebastiaan Janssen 14 Nov 2017, 10:56:03

Tags: Unscheduled

Is duplicated by: U4-9867

Is duplicated by: U4-9953

Is duplicated by: U4-9966

Is duplicated by: U4-10287

Is duplicated by: U4-10415

Subtask of: U4-9609

After a fresh 7.6 install, I change the user login and then a exception occurs

I made a screencast http://screencast-o-matic.com/watch/cbhfbUX3BG

Value cannot be null. Parameter name: user

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: user

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentNullException: Value cannot be null. Parameter name: user] Umbraco.Core.Models.UserExtensions.IsAdmin(IUser user) +84 Umbraco.Core.Security.MembershipProviderExtensions.CanResetPassword(MembershipProvider provider, IUserService userService) +85 Umbraco.Web.UI.Umbraco.Controls.PasswordChanger.OnPreRender(EventArgs e) +124 System.Web.UI.Control.PreRenderRecursiveInternal() +88 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +883

Comments

Bjarne Fyrstenborg 05 May 2017, 07:38:24

I had a similar issue, but without I changed username. Not sure how I got these issues: http://issues.umbraco.org/issue/U4-9845 http://issues.umbraco.org/issue/U4-9846

After installing a clean Umbraco 7.6.0 I couldn't reproduce the errors.

However I can confirm this error and after this occurs you can't access the views on each user - if you logout and login again you can access it again.


Harvey Williams 11 May 2017, 11:42:03

I just came across this issue.

I assume the error occurs because you are changing the currently logged in member's username. You're cookie/session hasn't been updated with the new username so it errors.

A workaround is changing the username, logging out, and logging back in again. You can then freely modify your current user again without the YSOD.


Dan Booth 11 May 2017, 12:47:29

Yep, just seen this in Umbraco 7.6.1

Go to users, select the user you are logged-in as and change the username and save. You then get: Value cannot be null. Parameter name: user

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: user

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentNullException: Value cannot be null. Parameter name: user] Umbraco.Core.Models.UserExtensions.IsAdmin(IUser user) +84 Umbraco.Core.Security.MembershipProviderExtensions.CanResetPassword(MembershipProvider provider, IUserService userService) +85 Umbraco.Web.UI.Umbraco.Controls.PasswordChanger.OnPreRender(EventArgs e) +124 System.Web.UI.Control.PreRenderRecursiveInternal() +88 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +883

Workaround is to log-out and log in again.


Alessandro Calzavara 25 May 2017, 11:00:58

Same problem here (7.6.1), logging out and then entering umbraco again fixed the problem


Nicholas Westby 16 Jul 2017, 23:04:09

This is still happening in Umbraco 7.6.4.


Merlin McKenzie 05 Sep 2017, 05:24:18

Can confirm this is occurring in 7.6.5. Logout / login workaround worked for me.


Sebastiaan Janssen 07 Nov 2017, 15:37:45

PR: https://github.com/umbraco/Umbraco-CMS/pull/2312


Shannon Deminick 08 Nov 2017, 05:07:14

Added an additional null check, tested, stepped through the code and confirmed it's working.


Shannon Deminick 08 Nov 2017, 06:22:01

side note, it seems we had already fixed this in 7.7 at some stage


Priority: Major

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.6.0, 7.6.1, 7.6.4, 7.6.5

Due in version: 7.7.5, 7.6.12

Sprint: Sprint 71

Story Points:

Cycle: 5