Skip to content
This repository was archived by the owner on Dec 13, 2021. It is now read-only.
This repository was archived by the owner on Dec 13, 2021. It is now read-only.

Compatibility with Tuples (XML format) #12

@dnwhte

Description

@dnwhte

Hello,

Looking for a bit of direction on resolving this issue.

I have a Property List that is using tuples:
image

It works fine when used in an innercontent component (json format), but not when used directly on a doctype (xml format).

I get the following error.

[XmlException: Data at the root level is invalid. Line 1, position 1.]
   System.Xml.XmlTextReaderImpl.Throw(Exception e) +91
   System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() +408
   System.Xml.XmlTextReaderImpl.ParseDocumentContent() +473
   System.Xml.XmlReader.MoveToContent() +118
   System.Xml.Linq.XElement.Load(XmlReader reader, LoadOptions options) +33
   System.Xml.Linq.XElement.Parse(String text, LoadOptions options) +156
   Our.Umbraco.Tuple.ValueConverters.TupleValueConverter.ConvertDataToSource(PublishedPropertyType propertyType, Object source, Boolean preview) +232
   Our.Umbraco.PropertyList.ValueConverters.PropertyListValueConverter.ConvertDataToSource(PublishedPropertyType propertyType, Object source, Boolean preview) +561
   Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedProperty.get_Value() +74
   Umbraco.Web.PublishedPropertyExtension.GetValue(IPublishedProperty property, Boolean withDefaultValue, T defaultValue) +123
   Umbraco.Web.PublishedContentExtensions.GetPropertyValue(IPublishedContent content, String alias) +75

Stored XML looks like:

        <footerSocialLinks>
          <values dtd="2f2b94f6-062d-4ec9-bb3f-9d768d42d238">
            <value>
              <values>
                <value udi="umb://data-type/cf8919ffc5cd408f8eac7e0909ed7588"><![CDATA[Facebook]]></value>
                <value udi="umb://data-type/0cc0eba1996042c9bf9b60e150b429ae"><![CDATA[]]></value>
              </values>
            </value>
            <value>
              <values>
                <value udi="umb://data-type/cf8919ffc5cd408f8eac7e0909ed7588"><![CDATA[Instagram]]></value>
                <value udi="umb://data-type/0cc0eba1996042c9bf9b60e150b429ae"><![CDATA[]]></value>
              </values>
            </value>
            <value>
              <values>
                <value udi="umb://data-type/cf8919ffc5cd408f8eac7e0909ed7588"><![CDATA[Twitter]]></value>
                <value udi="umb://data-type/0cc0eba1996042c9bf9b60e150b429ae"><![CDATA[]]></value>
              </values>
            </value>
            <value>
              <values>
                <value udi="umb://data-type/cf8919ffc5cd408f8eac7e0909ed7588"><![CDATA[Youtube]]></value>
                <value udi="umb://data-type/0cc0eba1996042c9bf9b60e150b429ae"><![CDATA[]]></value>
              </values>
            </value>
            <value>
              <values>
                <value udi="umb://data-type/cf8919ffc5cd408f8eac7e0909ed7588"><![CDATA[Snapshat]]></value>
                <value udi="umb://data-type/0cc0eba1996042c9bf9b60e150b429ae"><![CDATA[]]></value>
              </values>
            </value>
          </values>
        </footerSocialLinks>

I believe this is an issue with Property List and not Tuples, because a single tuple works fine directly on the doctype.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions