I have upgraded from 7.5.9 to 7.6.5.
In one of my partials, I have this code that worked in 7.5.9 is now giving me this error in 7.6.5.
Invalid JSON primitive: Umbraco.Web.Models.RelatedLinks at line
var links = Json.Decode(linksString);
@{
var linksString = Model.Links;
if (linksString != null && !String.IsNullOrWhiteSpace(linksString))
{
var links = Json.Decode(linksString);
foreach (var link in links)
{
<li><a href="@link.link">@link.caption</a></li>
}
}
}
Invalid JSON primitive: Umbraco.Web.Models.RelatedLinks.
I have upgraded from 7.5.9 to 7.6.5. In one of my partials, I have this code that worked in 7.5.9 is now giving me this error in 7.6.5. Invalid JSON primitive: Umbraco.Web.Models.RelatedLinks at line var links = Json.Decode(linksString);
Can anyone help me resolve this?
Thanks
Hi Tom,
This will be the same issue as https://our.umbraco.org/forum/templates-partial-views-and-macros/92556-var-imageid-itemgetpropertyvalueint-backgroundimage-returning-0-when-it-should-be-1513
Instead of getting the value as string it is now coming through as a strongly typed model.
Matt
Yes, setting EnablePropertyValueConverters=false fixed this issue too!
You're a genius!
Tom
is working on a reply...