Preview throws error at GetPropertyValue on media pickers when property data is a guid
HI,
i got some trouble with my preview. Maybe you can help me. First, the stacktrace:
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.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Umbraco.Web.PropertyEditors.ValueConverters.MultipleMediaPickerPropertyConverter.ConvertDataToSource(PublishedPropertyType propertyType, Object source, Boolean preview)
at Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedProperty.get_Value()
at Umbraco.Web.PublishedPropertyExtension.GetValue[T](IPublishedProperty property, Boolean withDefaultValue, T defaultValue) at Umbraco.Web.PublishedContentModels.xxxxx.get_Image()
at ASP._Page_Views_Partials_Grid_Editors_xxxxxxxx_cshtml.Execute()
This happens when i want to get the PropertyValue from a media picker field. On published view the image is rendered and no exception.
The RawData is a Guid at preview and on published view a id.
Preview throws error at GetPropertyValue on media pickers when property data is a guid
HI,
i got some trouble with my preview. Maybe you can help me. First, the stacktrace:
This happens when i want to get the PropertyValue from a media picker field. On published view the image is rendered and no exception.
The RawData is a Guid at preview and on published view a id.
Any ideas why this happens?
Best Thobias
Hi Thobias
Can you show the code?
Thanks,
Alex
I am not really sure what kind of code you want to see, maybe this:
and the generated method from "publication" type:
Does this help you?
Can you debug this code?
Only preview mode causes the exception?
Dont know at which point i should debug. Which class put the Guid instead of Id in the raw data?
is working on a reply...