When Shopify Picker Field is used in a document type and we pull the item through the Content Delivery API we get the following which looks like a bug.
Request:
https://localhost:44362/umbraco/delivery/api/v1/content/item/7cf104a3-ad0b-408d-9daf-3a8dd7c3ac57
Response:
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
"title": "System.NullReferenceException",
"status": 500,
"detail": "Object reference not set to an instance of an object.",
"traceId": "00-687d76bb4c81982b642343591962ed64-ff4217946126f02a-00",
"exception": {
"details": "System.NullReferenceException: Object reference not set to an instance of an object.\r\n at Umbraco.Cms.Integrations.Commerce.Shopify.Editors.ShopifyProductPickerValueConverter.<>c.b__6_2(ProductDto p)\r\n at System.Linq.Enumerable.WhereSelectListIterator2.ToList()\r\n at Umbraco.Cms.Integrations.Commerce.Shopify.Editors.ShopifyProductPickerValueConverter.ConvertIntermediateToObject(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, Object inter, Boolean preview)\r\n at Umbraco.Cms.Infrastructure.PublishedCache.Property.<>c__DisplayClass25_0.<GetDeliveryApiValue>g__GetDeliveryApiObject|0()\r\n at Umbraco.Cms.Infrastructure.PublishedCache.Property.GetDeliveryApiDefaultObject(CacheValue cacheValues, Func
1 getValue)\r\n at Umbraco.Cms.Infrastructure.PublishedCache.Property.GetDeliveryApiValue(Boolean expanding, String culture, String segment)\r\n at Umbraco.Cms.Core.DeliveryApi.ApiPropertyRenderer.GetPropertyValue(IPublishedProperty property, Boolean expanding)\r\n at Umbraco.Cms.Api.Delivery.Rendering.RequestContextOutputExpansionStrategy.b__8_1(IPublishedProperty property)\r\n at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](TSource[] source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer)\r\n at Umbraco.Cms.Api.Delivery.Rendering.RequestContextOutputExpansionStrategy.MapProperties(IEnumerable
1 properties)\r\n at Umbraco.Cms.Api.Delivery.Rendering.RequestContextOutputExpansionStrategy.MapContentProperties(IPublishedContent content)\r\n at Umbraco.Cms.Core.DeliveryApi.ApiContentBuilderBase1.Build(IPublishedContent content)\r\n at Umbraco.Cms.Api.Delivery.Controllers.ByIdContentApiController.ById(Guid id)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask
1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()\r\n--- End of stack trace from previous location ---\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()\r\n--- End of stack trace from previous location ---\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Umbraco.Cms.Web.Common.Middleware.BasicAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)\r\n at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at Umbraco.Cms.Web.BackOffice.Middleware.BackOfficeExternalLoginProviderErrorMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)\r\n at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore\MiniProfilerMiddleware.cs:line 114\r\n at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)\r\n at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)\r\n at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at Umbraco.Cms.Web.Common.Middleware.PreviewAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)\r\n at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestLoggingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)\r\n at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)\r\n at Umbraco.Forms.Web.HttpModules.ProtectFormUploadRequestsMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)\r\n at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)",
"headers": {
"Accept": [
"application/json"
],
"Host": [
"localhost:44362"
],
"User-Agent": [
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
],
"Accept-Encoding": [
"gzip, deflate, br"
],
"Accept-Language": [
"en"
],
},
"path": "/umbraco/delivery/api/v1/content/item/7cf104a3-ad0b-408d-9daf-3a8dd7c3ac57",
"endpoint": "Umbraco.Cms.Api.Delivery.Controllers.ByIdContentApiController.ById (Umbraco.Cms.Api.Delivery)",
"routeValues": {
"action": "ById",
"controller": "ByIdContentApi",
"id": "7cf104a3-ad0b-408d-9daf-3a8dd7c3ac57",
"version": "1"
}
}
}
This item has been added to our backlog AB#33479