1
Vote

Invalid JSON primitive: URL when returning a Multi Url property

description

When attempting to return the value of a Multi URl property via

return node.GetPropertyValue(propertyAlias).ToString();

I get the above error (uComponents 6.0.1-build023, |Umbraco 6.1.2. Stack trace:

[ArgumentException: Invalid JSON primitive: URL.]
System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject() +522135
System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) +265
System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) +78
System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) +44
System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(String input) +70
uComponents.PropertyEditors.ValueConverters.MultiUrlPicker.MultiUrlPickerPropertyEditorValueConverter.ConvertPropertyValue(Object value) +142
Umbraco.Core.<>c__DisplayClassa.<ConvertPropertyValue>b__6(IPropertyEditorValueConverter p) +53

comments

diachedelic wrote Sep 11, 2013 at 5:38 PM

Did you change the format after saving values? That will break it.

barnakles wrote Sep 11, 2013 at 9:17 PM

I did upgrade from v5.5.1, and I had saved values in the DB before the upgrade, so yes that could be it.