Copied to clipboard

Flag this post as spam?

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


  • Richard 38 posts 78 karma points
    Jul 12, 2010 @ 09:31
    Richard
    0

    Translate task import bombs n onodeNames with escaped HTML?

    Hi this is a cross post that I posted to the "bugs" forum was well. I am not sure if this is an Umbrco bug, or just a usage caveat...

    umbraco v 4.0.3 (Assembly version: 1.0.3625.27276), ASP.NET 3.5, IIS7.5, Windows Server 2008

    we are using the translation tasks, since it is the best way to integrate our pages with our translation management tools. Anyway, when a nodeName contains non-ascii-7 characters, Umbraco escapes them with valid escaped HTML, suche as Conditions générales for "Conditions genéralés". This is fine, and our translation tool handles it. However, when I try to import (Upload translation task results), Umbraco prduces a nice stack trace. And we've traced it to the nodName in the XML header that contains these valid HTML escapes. This can't be a feature, since Umbraco crashes on the nodeName that it generated. Any tips? Thanks!

    I can send any and all files as required. Below is, first, the XML, which works fine if you remove the HTML escapes in the node name, and the stack trace.

    1.

    <?xml version="1.0" encoding="UTF-8"?>
    <tasks> <task Id="258" Date="2010-07-11T19:31:01" NodeId="2162" TotalWords="44"><Comment><![CDATA[]]></Comment><PreviewUrl>http://info.grexglobal.com/umbraco/translation/preview.aspx?id=258</PreviewUrl><node id="2162" version="f9e261fe-62be-4f70-bf26-e77b56373fef" parentID="2160" level="4" writerID="4" creatorID="4" nodeType="1145" template="1133" sortOrder="2" createDate="2010-07-11T14:05:01" updateDate="2010-07-11T15:28:45"     nodeName="Conditions g&eacute;n&eacute;rales"   urlName="allgemeine-geschaeftsbedingungen" writerName="jvr" creatorName="jvr" nodeTypeAlias="CWS_Textpage" path="-1,1361,1339,2160,2162"><data alias="umbracoUrlName"></data><data alias="umbracoUrlAlias">terms,de/terms</data>
    <data alias="metaDescription"><![CDATA[  ]]></data>
    <data alias="metaKeywords"><![CDATA[  ]]></data>
    <data alias="umbracoRedirect">0</data><data alias="umbracoNaviHide">0</data>
    <data alias="headerText"><![CDATA[  <p>Conditions g&eacute;n&eacute;rales</p>  ]]></data>
    <data alias="rcImage"><![CDATA[]]></data>
    <data alias="bodyText"><![CDATA[
     <p>L'utilisation conditions g&eacute;n&eacute;rales</p>   
    ]]></data></node></task></tasks>


    2.

    Stack Trace:

    [Exception: Error importing translation file 'W:\rcInfoCenter\data\translationFile_b4757e8e-b652-4617-a351-df754fa8a598.xml': System.Xml.XmlException: Reference to undeclared entity 'eacute'. Line 2, position 458.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.HandleGeneralEntityReference(String name, Boolean isInAttributeValue, Boolean pushFakeEntityIfNullResolver, Int32 entityStartLinePos)
       at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
       at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
       at System.Xml.XmlTextReaderImpl.ParseAttributes()
       at System.Xml.XmlTextReaderImpl.ParseElement()
       at System.Xml.XmlTextReaderImpl.ParseElementContent()
       at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
       at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
       at System.Xml.XmlDocument.Load(XmlReader reader)
       at System.Xml.XmlDocument.Load(String filename)
       at umbraco.presentation.translation._default.importTranslatationFile(String tempFileName)]
       umbraco.presentation.translation._default.importTranslatationFile(String tempFileName) +1539
       umbraco.presentation.translation._default.uploadFile_Click(Object sender, EventArgs e) +2339
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981


    Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 12, 2010 @ 11:17
    Dirk De Grave
    0

    Report this on Codeplex, add some repro path for the team to have a look at (also mention umbraco version and other info which may be of any relevance)

     

    Cheers,

    /Dirk

Please Sign in or register to post replies

Write your reply to:

Draft