Issues adding roles when using User Manager and Chrome 38

  • Description

    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:

    1. Open the /Website/sitecore/shell/Applications/Security/SelectRoles/SelectRoles.xaml.xml file.
    2. Replace the following block of code in the update() function:
    3. 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;
      }
    4. Clear the browser cache.

Applies to:

CMS 6.4.1 Update-5+

CMS 7.2 Update-3 (Service Pack-1), 7.5 Update-1

October 28, 2014
March 03, 2015

Reference number:

422242

Keywords: 

  • CMS