Chrome バージョン38以降とユーザー マネージャー アプリケーションを使用して既存のSitecoreユーザーにロールを追加すると、次のような異常な動作が発生する場合があります。
ユーザーに単一のロールを追加する場合、[ユーザーロールの編集]ダイアログを閉じた後、そのロールがロールのリストに表示されない場合があります。
複数のロールを追加すると、次のエラーが発生する場合があります:
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 ...
この事象を解決するには、以下の手順に従ってください:
if(typeof(option.innerText) != 'undefined') { optionValue = option.innerText; } else { optionValue = option.textContent; }
次のように変更します。
if(typeof(option.textContent) == 'undefined') { optionValue = option.innerText; } else { optionValue = option.textContent; }