When using Chrome 38 or later Chrome versions and the User Manager application to add roles to existing Sitecore users, the following erratic behavior may appear.
When adding a single role to a user, it might not appear in the list of roles after the Edit User Roles dialog is closed.
When adding multiple roles, the following error may be raised:
Exception Details: System.ArgumentException: Empty strings are not allowed. Parameter name: roleName ... Stack Trace: [ArgumentException: Empty strings are not allowed. Parameter name: roleName] Sitecore.Security.Accounts.Role.FromName(String roleName) +257 Sitecore.Shell.Applications.Security.EditUser.EditUserPage.Add_Click() +557 [TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +229 ...
To resolve the issue, follow the steps below:
if(typeof(option.innerText) != 'undefined') { optionValue = option.innerText; } else { optionValue = option.textContent; }
with the following:
if(typeof(option.textContent) == 'undefined') { optionValue = option.innerText; } else { optionValue = option.textContent; }