Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • dandrayne 1138 posts 2262 karma points
    Feb 02, 2010 @ 15:22
    dandrayne
    0

    Xslt error when double space used in RTE

    Hi All

    I've got a rather length xslt macro that displays project data on a page.  An unusual error occurs when I put two spaces after a full-stop or insert a macro, and I get the "error parsing xslt file".  When I delete the extra full stop/macro and republish the content comes back in without error.

    The error I receive is as follows

    umbracoMacro InnerException Unexpected end of file while parsing PI has occurred. Line 5, position 13.
    Unexpected end of file while parsing PI has occurred. Line 5, position 13.
      at System.Xml.XmlTextReaderImpl.Throw(Exception e)
      at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
      at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg)
      at System.Xml.XmlTextReaderImpl.ParsePIValue(Int32& outStartPos, Int32& outEndPos)
      at System.Xml.XmlTextReaderImpl.ParsePI(BufferBuilder piInDtdStringBuilder)
      at System.Xml.XmlTextReaderImpl.ParseElementContent()
      at System.Xml.XmlTextReaderImpl.Read()
      at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
      at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
      at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
      at System.Xml.XmlDocument.Load(XmlReader reader)
      at System.Xml.XmlDocument.LoadXml(String xml)
      at umbraco.library.GetXmlNodeById(String id)

    I'm rendering the content of the RTE with

    <xsl:value-of select="umbraco.library:RenderMacroContent(current()/data [@alias = 'testimonialText'], $currentPage/@id)" disable-output-escaping="yes"/>

    But the same error also occurs with the following

    <xsl:value-of select="current()/data [@alias = 'testimonialText']" disable-output-escaping="yes"/>

    Has anyone seen anything like this before/know of any solutions?

    Cheers,
    Dan

     

     

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Feb 02, 2010 @ 16:03
    Douglas Robar
    0

    Wow, a weird one!

    If you do a copy-of the testimonialText... any hints about what's in there? Maybe there's some bad markup in there that's causing things to blow up? That's a long shot, but then again... this is a long-shot kind of problem ;)

    cheers,
    doug.

  • dandrayne 1138 posts 2262 karma points
    Feb 02, 2010 @ 16:10
    dandrayne
    0

    I could stop double-spaces causing the error by disabling tidyeditorcontent un umbracosettings.config.

    I was going to lose my hair working out the other one, so I worked around it and used a different solution.  Very frustrating!

    Dan

  • dandrayne 1138 posts 2262 karma points
    Feb 02, 2010 @ 16:11
    dandrayne
    0

    Oh, should have mentioned: There was no odd code, no invalid chars, no badly formed markup in the RTE. It even happened when typing freely into the editor.

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Feb 03, 2010 @ 01:49
    Chriztian Steinmeier
    0

    Hi Dan,

    The error mentions an error while parsing a "Processing-Instruction" (the 'PI') - so my guess is that it's somehow choking on some leftover <?UMBRACO_MACRO ... ?> syntax from an earlier insert, that wasn't deleted properly. (Its is what gets inserted in the field when inserting macros.)

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft