Copied to clipboard

Flag this post as spam?

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


  • SaphuA 124 posts 87 karma points
    Nov 01, 2009 @ 00:24
    SaphuA
    0

    Custom Macro Property Type and XML

    Hello,

    I've made my own Macro Property Type, using the methode described here: http://forum.umbraco.org/yaf_postst2224_Extending-macro-datatype.aspx

    However, I have some trouble with storing the data when using xml.

    It appears that somehow Umbraco tries to validate or parse the xml before it saves it. Somehow, it fails to save when a node contains two children with the same name.

    For example, when I set the value to something like this it works:

    <Test> <Node Name="Node01" /> </Test>

    (Sample: <Test><Node Name="Node01" /></Test>)

    But it fails when the value returned is this:

    &lt;Test&gt; &lt;Node Name=&quot;Node01&quot; /&gt; &lt;Node Name=&quot;Node02&quot; /&gt; &lt;/Test&gt;

    (Sample: <Test><Node Name="Node01" /><Node Name="Node02" /></Test>)

    I shows the following error after republishing the document:

    "umbraco was unable to parse a macro tag, which means that parts of this content might be corrupt."

    Why is this happening and what can I do to fix it?

  • SaphuA 124 posts 87 karma points
    Nov 01, 2009 @ 00:35
    SaphuA
    0

    Update:

    It appears I was slightly wrong..

    The error is thrown when nodes have the same property (except for name).

    So this makes even less sence.

  • SaphuA 124 posts 87 karma points
    Nov 01, 2009 @ 11:58
    SaphuA
    0

    I'm still not sure why it doesn't work..

    Although I fixed it by replacing all equal and quote characters...

Please Sign in or register to post replies

Write your reply to:

Draft