2013-04-26 64 views
3

另一個愚蠢的人...嘗試訪問管理員最初創建的作爲普通用戶的現有內容項目,但獲得以下多汁的異常。我可以看到內容樹中的項目是這個用戶,但是當我點擊一個項目來查看它時(和推測將其編輯爲下一步),會拋出異常。Sitecore - 服務器錯誤訪問內容項目(黃色屏幕死亡)

Server Error in '/' Application.

Null ids are not allowed. Parameter name: displayName

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: Null ids are not allowed. Parameter name: displayName

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: Null ids are not allowed. Parameter name: displayName]
Sitecore.Diagnostics.Assert.ArgumentNotNullOrEmpty(String argument, String argumentName) +75
Sitecore.Shell.Applications.ContentEditor.EditorFormatter.RenderSectionBegin(Control parent, String controlId, String sectionName, String displayName, String icon, Boolean isCollapsed, Boolean renderFields) +69
Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderSectionPanel(XmlNode element) +214
Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderElement(XmlNode element) +487
Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.AddText(XmlNode element) +423
Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderElement(XmlNode element) +533
Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.AddText(XmlNode element) +423
Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderElement(XmlNode element) +533
Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.Render(XmlDocument skin) +93
Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.Process(RenderContentEditorArgs args) +353 (Object , Object[]) +61
Sitecore.Pipelines.PipelineMethod.Invoke(Object[] parameters) +36
Sitecore.Pipelines.CoreProcessor.Invoke(Object[] parameters) +43
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +133
Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +154
Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +64
Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args) +50
Sitecore.Shell.Applications.ContentManager.Editor.Render(RenderContentEditorArgs args, Control parent) +450
Sitecore.Shell.Applications.ContentManager.Editor.Render(Item item, Item root, Hashtable fieldInfo, Control parent, Boolean showEditor) +239 Sitecore.Shell.Applications.ContentManager.ContentEditorForm.RenderEditor(Item item, Item root, Control parent, Boolean showEditor) +153
Sitecore.Shell.Applications.ContentManager.ContentEditorForm.UpdateEditor(Item folder, Item root, Boolean showEditor) +238
Sitecore.Shell.Applications.ContentManager.ContentEditorForm.Update() +249 Sitecore.Shell.Applications.ContentManager.ContentEditorForm.OnPreRendered(EventArgs e) +116

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +69
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +306
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +22 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +38
Sitecore.Reflection.ReflectionUtil.CallMethod(Type type, Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Boolean includeStatic, Object[] parameters) +104
Sitecore.Reflection.ReflectionUtil.CallMethod(Type type, Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Object[] parameters) +26
Sitecore.Reflection.ReflectionUtil.CallMethod(Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Object[] parameters) +41
Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e) +87 System.Web.UI.Control.PreRenderRecursiveInternal() +150
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2838

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

+0

當您以admin用戶身份登錄時,您能看到該項目嗎? – 2013-04-26 20:11:40

+0

@CraigTaylor - 當我以管理員身份登錄時,我可以確定地看到該項目,但我也可以在編輯器帳戶中看到它。噢,我也會把它添加到頂端,但是當我點擊該項目進行編輯時會出現錯誤。 – longda 2013-04-26 20:20:50

+0

下一次你得到這個錯誤。清除緩存並刷新頁面。 – Gabbar 2013-08-12 21:14:06

回答

3

所以,我回去和刪除發現如下回答之後,帳戶設置任何自定義訪問權限(這解決了我的問題):

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.

參考: http://trayek.wordpress.com/2013/03/21/sitecore-content-editor-woes/

對於後代,這裏是全部(RIP)鏈接:

[ArgumentNullException]: Null ids are not allowed. Parameter name: displayName I ran into this error after setting up a user with limited read/write permissions. I created a custom role, assigned 'Sitecore Client Author' and 'Sitecore Client User', assigned the user to the role, and checked that they could log in and see the content tree. Everything seemed fine, until I tried clicking on any of the items under 'Home'. On some occasions, one of two things happened: I got this error: [ArgumentNullException]: Null ids are not allowed. Parameter name: displayName Items that I knew ought to have fields, didn't I tried different combinations of roles (including dropping my custom role and using Sitecore's defaults only), but I still ran into problems - again, only on certain items. As far as I could tell, administrators were the only users able to see items, and there were no examples of working users without admin rights.

The website had recently been upgraded from Sitecore 5 (I'm not sure which version) to Sitecore 6.3.1 (rev. 110112), and as far as I know, it wasn't until after this point that the problem became apparent. I've seen the error before in almost exactly the same circumstances, so I would wager that it has something to do with the upgrade.

When I looked through the permissions for user-created templates (not system templates) permissions, I noticed that inheritance had been denied on section/field child items for quite a few templates. I couldn't see a reason why this should be the case, so I spent some time getting rid of the explicit deny (there were 50+ cases of it in this particular install) - hey presto, the error disappeared! I had to use the 'Remove Inherit' button in the Security Editor ribbon; using 'Assign' or unchecking the [ X ] next to the in 'Inheritance' permission for the item didn't work.

參考:http://web.archive.org/web/20130317212504/http://egointeractive.posterous.com/argumentnullexception-null-ids-are-not-allowe

+1

很高興看到它幫助了某人:-) – Trayek 2013-04-29 08:05:00

+1

posterous.com似乎已經死了互聯網的巨大死亡。 Wayback機器鏈接:http://web.archive.org/web/20130317212504/http://egointeractive.posterous.com/argumentnullexception-null-ids-are-not-allowe – 2013-07-08 22:32:11