A while back I got a support issue where a client's Content Editor was suddenly very broken. No UI – just a giant YSOD. It's turned out to be the sort of mistake which I could see happening to others, so here's some info on what happened and ways the problem can be resolved.
Since that was blocking content creation work it was a Big Issue for the team. So off to the logs I went. The underlying exception was:
Exception: System.Reflection.TargetInvocationException Message: Exception has been thrown by the target of an invocation. Source: mscorlib at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 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.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.NullReferenceException Message: Object reference not set to an instance of an object. Source: Sitecore.Buckets at Sitecore.Buckets.Commands.MakeTemplateBucketable.GetToolTip(CommandContext context, String tooltip) at Sitecore.Web.UI.WebControls.Ribbons.Ribbon.FillParamsFromCommand(CommandContext commandContext, RibbonCommandParams ribbonCommandParams) at Sitecore.Web.UI.WebControls.Ribbons.Ribbon.GetCommandParameters(Item controlItem, CommandContext commandContext) at Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderSmallCheckButton(HtmlTextWriter output, Item button, CommandContext commandContext) at Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderButton(HtmlTextWriter output, Item button, CommandContext commandContext) at Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter output, Item chunk, CommandContext commandContext) at Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter output, Item chunk, CommandContext commandContext, Boolean isContextual, String id) at Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter output, Item chunk, CommandContext commandContext, Boolean isContextual) at Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunks(HtmlTextWriter output, Item strip, CommandContext commandContext, Boolean isContextual) at Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderStrips(HtmlTextWriter output, Item ribbon, Boolean isContextual, ListString visibleStripList) at Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderStrips(HtmlTextWriter output, Item defaultRibbon, Item contextualRibbon, ListString visibleStripList) at Sitecore.Web.UI.WebControls.Ribbons.Ribbon.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at Sitecore.Web.HtmlUtil.RenderControl(Control ctl) at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.UpdateRibbon(Item folder, Boolean isCurrentItemChanged, Boolean showEditor) at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.Update() at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.OnPreRendered(EventArgs e)
That crash is generally a bit of an issue when it happens with any old item – but it's particularly bad if the item in question happens to be "Home". The first item named "home" found under "/sitecore/content" is the one loaded automatically when Content Editor starts. So if this item is broken, then you're a bit stuffed, because Content Editor can't start up without encountering this crash.
The alternative is that you need to get rid of the item which is causing all the issues. Not having access to Content Editor makes that slightly less easy, but you still have choices. Maybe you have PowerShell Extensions installed? If so that can be used to call
Remove-Item
to perform the deletion. But if you don't, it's time to break out a classic old admin tool: DB Browser! You can access this from the
/sitecore/admin/
url on your CM instance, and picking "DB Browser" from the menu:
As well as a useful tool, this image actually gives another clue to what's broken. When you look at a working item in DB Browser, it shows you the set of templates the item relies on to the right of the item's path:
But in the case of our issue, (or similarly broken items) you'll see template(s) missing. In this case, since these items had no valid templates, that space to the right of the path was entirely empty:
But with this tool, it's an easy job to remove the broken item, by clicking the "Delete" button in the row of commands. With that done, Content Editor will sort itself out.
In my case, that was all that needed doing to resolve the issue – well, that and a bit of user education to ensure everyone understood what had gone wrong...
↑ Back to top