Sitecore Content Editor Woes

I decided to write this post after struggling with this for a while, and not being able to find a lot of help.

When a regular user (i.e. not a user with Admin rights) opened the Content Editor and clicked any of the options on the View tab they’d a completely white screen (in IE) or yellow screen with some XML error (FireFox), and the following error would show in the logfile:

ERROR Application error.
Exception: System.Web.HttpUnhandledException
Message: Exception of type ‘System.Web.HttpUnhandledException’ was thrown.
Source: System.Web
  at System.Web.UI.Page.HandleError(Exception e)
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  at System.Web.UI.Page.ProcessRequest()
  at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
  at System.Web.UI.Page.ProcessRequest(HttpContext context)
  at ASP.sitecore_shell_applications_content_manager_default_aspx.ProcessRequest(HttpContext context)
  at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception

Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
  at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
  at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
  at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
  at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj)
  at Sitecore.Reflection.ReflectionUtil.CallMethod(Type type, Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Boolean includeStatic, Object[] parameters)
  at Sitecore.Reflection.ReflectionUtil.CallMethod(Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Object[] parameters)
  at Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e)
  at System.Web.UI.Control.PreRenderRecursiveInternal()
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Nested Exception

Exception: System.ArgumentNullException
Message: Null ids are not allowed.
Parameter name: displayName
Source: Sitecore.Kernel
  at Sitecore.Diagnostics.Assert.ArgumentNotNullOrEmpty(String argument, String argumentName)
  at Sitecore.Shell.Applications.ContentEditor.EditorFormatter.RenderSectionBegin(Control parent, String controlId, String sectionName, String displayName, String icon, Boolean isCollapsed, Boolean renderFields)
  at Sitecore.Shell.Applications.ContentEditor.EditorFormatter.RenderSection(Section section, Control parent, Boolean readOnly)
  at Sitecore.Shell.Applications.ContentEditor.EditorFormatter.RenderSections(Control parent, Sections sections, Boolean readOnly)
  at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderStandardContentEditor.Process(RenderContentEditorArgs args)
  at (Object , Object[] )
  at Sitecore.Pipelines.PipelineMethod.Invoke(Object[] parameters)
  at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
  at Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
  at Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
  at Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args)
  at Sitecore.Shell.Applications.ContentManager.Editor.Render(RenderContentEditorArgs args, Control parent)
  at Sitecore.Shell.Applications.ContentManager.Editor.Render(Item item, Item root, Hashtable fieldInfo, Control parent, Boolean showEditor)
  at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.RenderEditor(Item item, Item root, Control parent, Boolean showEditor)
  at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.UpdateEditor(Item folder, Item root, Boolean showEditor)
  at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.Update()
  at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.OnPreRendered(EventArgs e)

A message that’s very long, but also not very helpful in finding a solution.

The only helpful thing I found was http://egointeractive.posterous.com/argumentnullexception-null-ids-are-not-allowe

Which mentions the same thing happening because of denied read rights on templates.

That did fix the problem, giving me another one – some fields on some templates shouldn’t be visible for specific users. Luckily the answer to that one was an easy one: All I needed to do was deny the Field Read right, rather than the Read right.

The Field Read right can be altered by clicking the Columns button in the Security Editor, then ticking the Field Read box. After denying Field Read rights, the users now can view the standard values, but not the fields they’re not supposed to see.