I have noticed a bug with the Related Links data type and wondered if anyone else has seen this.
To replicate, follow these steps:
1). Add a link with a caption but no value in the Link field (retaining the default value of "http://") and click Save and publish.
2). Edit the link and click choose internal page and save without selecting a page, then Save and publish.
The content appears to be returned OK and you can render the links on your page, but the following error is logged in the Umbraco log:
2016-08-18 08:37:20,197 [P2924/D3/T11] ERROR Umbraco.Web.PropertyEditors.ValueConverters.RelatedLinksEditorValueConvertor - Could not parse the string [
{
"caption": "Test",
"link": "http://",
"newWindow": false,
"edit": false,
"isInternal": true,
"type": "internal",
"title": "Test"
}
] to a json object
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
at Umbraco.Web.PropertyEditors.ValueConverters.RelatedLinksEditorValueConvertor.ConvertDataToSource(PublishedPropertyType propertyType, Object source, Boolean preview)
As can be seen, the link property has retained the default value of "http://" but the isInternal and type properties indicate that an internal page has been supplied. The editor value will expect an ID here so when it tries to convert the link value to an integer this error is being generated.
Related Links Format Error
Hi.
I have noticed a bug with the Related Links data type and wondered if anyone else has seen this.
To replicate, follow these steps:
1). Add a link with a caption but no value in the Link field (retaining the default value of "http://") and click Save and publish.
2). Edit the link and click choose internal page and save without selecting a page, then Save and publish.
The content appears to be returned OK and you can render the links on your page, but the following error is logged in the Umbraco log:
As can be seen, the link property has retained the default value of "http://" but the isInternal and type properties indicate that an internal page has been supplied. The editor value will expect an ID here so when it tries to convert the link value to an integer this error is being generated.
Thanks.
Hi. Just wondered if anyone had any feedback for this issue?
is working on a reply...