Open dnwhte opened 5 years ago
Hi @dnwhte. Hmmm, trying to remember how Property List code works 🤔
Looking at the XML data, the nested <value>
elements may be causing an issue.
This line...
https://github.com/umco/umbraco-property-list/blob/develop/src/Our.Umbraco.PropertyList/ValueConverters/PropertyListValueConverter.cs#L56
... is calling XPathSelectElements("value")
, which might be gobbling up the Tuple values too? (That's purely guesswork)
If you're building from source, then you could try tweaking that line to be something like...
items.AddRange(elements.XPathSelectElements("./value").Select(x => x.Value));
That should restrict the XPath to use the immediate <value>
elements.
In other news... is "Snapshat" a typo, or satire? 😉
Well, that's not the issue. However it does appear to be with that line.
It seems a different selection is needed depending on the type that is being repeated.
Ex. Works for property lists repeating simple types
items.AddRange(elements.XPathSelectElements("./value").Select(x => x.Value));
Ex. Works for property lists repeating a tuple
items.AddRange(elements.XPathSelectElements("./value/values"));
XML for a couple types of property lists. The last one is a tuple.
ha...It's a typo, but I wish I had thought of it 😁.
Hello,
Looking for a bit of direction on resolving this issue.
I have a Property List that is using tuples:
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.
Stored XML looks like:
I believe this is an issue with Property List and not Tuples, because a single tuple works fine directly on the doctype.
Thanks!