Illegal Characters in Path Exception in Sitecore Preview

Posted 09/14/2011 by techphoria414

Posted in

Just filed a bug report with Sitecore Support. In case you are out there searching Google for the same exception, here's the issue. This is Sitecore 6.4.1 rev. 110720.


One of my developers accidentally applied Layout Details to a template, instead of its Standard Values. This used to work, even though it is not a best practice. When opening items based on the template, most of the time he would get the error below. This seems to be due to WebEditRibbon.ConvertToJson not finding the Layout Details on the template, then calling the wrong method on XmlDocument (Load instead of LoadXml).
[ArgumentException: Illegal characters in path.]
   System.IO.Path.CheckInvalidPathChars(String path) +142
   System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength) +100
   System.IO.Path.GetFullPath(String path) +187
   System.Xml.XmlResolver.ResolveUri(Uri baseUri, String relativeUri) +131
   System.Xml.XmlTextReaderImpl..ctor(String url, XmlNameTable nt) +135
   System.Xml.XmlDocument.Load(String filename) +85
   Sitecore.Web.UI.WebControls.WebEditRibbon.ConvertToJson(String layout) +210
   Sitecore.Web.UI.WebControls.WebEditRibbon.Render(HtmlTextWriter output, Item item) +1268
   Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output) +387
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +315
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   +11363410
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
   Boolean includeStagesAfterAsyncPoint) +5290
The solution is simply to apply the layout details to the Standard Values, instead of the Template itself.

Share:

Pre-Disqus Comments

  • Christian Willumsen's gravatar Christian Willumsen said:
    2/8/2012 7:43 AM

    Perfect, this was happening to me and helped me fix the problem.

  • George Vaccaro's gravatar George Vaccaro said:
    1/23/2012 12:10 PM

    Thanks! I just ran into the same thing and your post saved me the time of tracking it down myself. Nice new "feature" of sitecore :).

  • Jeremy Clifton's gravatar Jeremy Clifton said:
    12/13/2011 3:49 PM

    Thanks for posting this. Helped me solve the same problem on a solution that I just upgraded to 6.4.1 110720 in minutes!

Sitecore MVP

Popular Posts

Archive

Syndication