Thanks for your reply... No I've not maganed to fix this yet.
@Model.Value("Link"); returns the "Umbraco.Cms.Core.Models.Link " object.
however if this is unset I get the following error...
System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.)
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Umbraco.Cms.Core.PropertyEditors.ValueConverters.MultiUrlPickerValueConverter.ConvertIntermediateToObject(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, Object inter, Boolean preview)
at Umbraco.Cms.Core.Models.PublishedContent.PublishedPropertyType.ConvertInterToObject(IPublishedElement owner, PropertyCacheLevel referenceCacheLevel, Object inter, Boolean preview)
at Our.Umbraco.DocTypeGridEditor.Models.DetachedPublishedProperty.<.ctor>b_71()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy1.CreateValue()
at Umbraco.Extensions.PublishedElementExtensions.Value(IPublishedElement content, IPublishedValueFallback publishedValueFallback, String alias, String culture, String segment, Fallback fallback, Object defaultValue)
at Umbraco.Extensions.FriendlyPublishedElementExtensions.Value(IPublishedElement content, String alias, String culture, String segment, Fallback fallback, Object defaultValue)
at AspNetCore.Views_Partials_grid_editors_DocTypeGridEditor_imageSimple.ExecuteAsync() in C:\Users\Administrator\Desktop\Publish\PCClub 2022\Views\Partials\grid\editors\DocTypeGridEditor\imageSimple.cshtml:line 85
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
at Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ExecuteAsync(ViewComponentContext context)
at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context)
at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeCoreAsync(ViewComponentDescriptor descriptor, Object arguments)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.RenderDocTypeGridEditorItem(IViewComponentHelper helper, IHtmlHelper htmlHelper, IPublishedElement content, String editorAlias, String viewPath, String previewViewPath, Boolean isPreview)
at Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.RenderDocTypeGridEditorItem(IViewComponentHelper helper, IHtmlHelper htmlHelper, Object model)
at AspNetCore.apppluginsdoctypegrideditorrenderdoctypegrideditor.ExecuteAsync() in C:\Users\Administrator\Desktop\Publish\PCClub 2022\appplugins\doctypegrideditor\render\doctypegrideditor.cshtml:line 4
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.RenderPartialCoreAsync(String partialViewName, Object model, ViewDataDictionary viewData, TextWriter writer)
at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.PartialAsync(String partialViewName, Object model, ViewDataDictionary viewData)
at AspNetCore.ViewsPartialsgrideditors_base.ExecuteAsync() in C:\Users\Administrator\Desktop\Publish\PCClub 2022\Views\Partials\grid\editors\base.cshtml:line 6
when I check for a null entry or I get a similar error if I check for an empty string.
This was working fine up to version 9.2, but stopped when i upgraded the project to 9.3
Seems to be when I import MultiUrlPickers via uSync into a new db, and although all seems well in Models, code, and page definitions - the field using the MutliUrlPicker is being handled like it doesn't exist.
Once I save a link value to it - the object behaves normally, and I can remove the link, and the object still behaves normally.
But not ideal when there are hundreds of pages to import.
MultiUrlPicker on 9.3
Does anyone have a fix for this? A bug seems to have crept in between 9.2 and 9.3. The MultiUrlPicker no longer seems to work with a null value...
I now get an error if I have an unset value
Have you resolved your issue?
If not, please provide some extra information.
On which line does it fail? What does it say if you replace everything with
@Model.Value("link")
(it should print out the type of the object)Hi Damiaan,
Thanks for your reply... No I've not maganed to fix this yet.
@Model.Value("Link"); returns the "Umbraco.Cms.Core.Models.Link " object. however if this is unset I get the following error...
System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object. at Umbraco.Cms.Core.PropertyEditors.ValueConverters.MultiUrlPickerValueConverter.ConvertIntermediateToObject(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, Object inter, Boolean preview) at Umbraco.Cms.Core.Models.PublishedContent.PublishedPropertyType.ConvertInterToObject(IPublishedElement owner, PropertyCacheLevel referenceCacheLevel, Object inter, Boolean preview) at Our.Umbraco.DocTypeGridEditor.Models.DetachedPublishedProperty.<.ctor>b_71() at System.Lazy
1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy
1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at Umbraco.Extensions.PublishedElementExtensions.Value(IPublishedElement content, IPublishedValueFallback publishedValueFallback, String alias, String culture, String segment, Fallback fallback, Object defaultValue) at Umbraco.Extensions.FriendlyPublishedElementExtensions.Value(IPublishedElement content, String alias, String culture, String segment, Fallback fallback, Object defaultValue) at AspNetCore.Views_Partials_grid_editors_DocTypeGridEditor_imageSimple.ExecuteAsync() in C:\Users\Administrator\Desktop\Publish\PCClub 2022\Views\Partials\grid\editors\DocTypeGridEditor\imageSimple.cshtml:line 85 at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) at Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ExecuteAsync(ViewComponentContext context) at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context) at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeCoreAsync(ViewComponentDescriptor descriptor, Object arguments) --- End of inner exception stack trace --- at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification) at Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.RenderDocTypeGridEditorItem(IViewComponentHelper helper, IHtmlHelper htmlHelper, IPublishedElement content, String editorAlias, String viewPath, String previewViewPath, Boolean isPreview) at Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.RenderDocTypeGridEditorItem(IViewComponentHelper helper, IHtmlHelper htmlHelper, Object model) at AspNetCore.apppluginsdoctypegrideditorrenderdoctypegrideditor.ExecuteAsync() in C:\Users\Administrator\Desktop\Publish\PCClub 2022\appplugins\doctypegrideditor\render\doctypegrideditor.cshtml:line 4 at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.RenderPartialCoreAsync(String partialViewName, Object model, ViewDataDictionary viewData, TextWriter writer) at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.PartialAsync(String partialViewName, Object model, ViewDataDictionary viewData) at AspNetCore.ViewsPartialsgrideditors_base.ExecuteAsync() in C:\Users\Administrator\Desktop\Publish\PCClub 2022\Views\Partials\grid\editors\base.cshtml:line 6when I check for a null entry or I get a similar error if I check for an empty string.
This was working fine up to version 9.2, but stopped when i upgraded the project to 9.3
I have the same issue. Did you find a solution? Thank you Katie
I have the same issue at the moment.
Seems to be when I import MultiUrlPickers via uSync into a new db, and although all seems well in Models, code, and page definitions - the field using the MutliUrlPicker is being handled like it doesn't exist.
Once I save a link value to it - the object behaves normally, and I can remove the link, and the object still behaves normally.
But not ideal when there are hundreds of pages to import.
Anyone get to the bottom of this?
is working on a reply...