question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

V8: Can't show list views for variant content on latest

See original GitHub issue

There’s something funky going on. I have a culture variant content type with list view enabled. On latest source (d0b9fb7d) this results in:

image

Removing the list view fixes the problem.

The error originates from the call to ContentController.GetChildren (http://localhost:8100/umbraco/backoffice/UmbracoApi/Content/GetChildren?id=1093&includeProperties=updateDate,owner&pageNumber=1&pageSize=2&orderBy=updateDate&orderDirection=Descending&orderBySystemField=true&filter=&cultureName=en-US). The controller action itself executes just fine, but when AngularJsonMediaTypeFormatter is tasked with writing the response, it throws the error shown above.

I’m pretty sure this error has been introduced within the last few days. That should narrow down the search for the bug 😄 I’d hunt for it myself but I’m at a loss as to why the ContentPropertyBasicMapper is invoked while writing the response.

Full stack trace of the inner exception

System.InvalidOperationException: No culture found in mapping operation when one is required for the culture variant property type heading at Umbraco.Web.Models.Mapping.ContentPropertyBasicMapper1.Map(Property property, TDestination dest, MapperContext context) in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Web\Models\Mapping\ContentPropertyBasicMapper.cs:line 63 at Umbraco.Web.Models.Mapping.ContentPropertyMapDefinition.Map(Property source, ContentPropertyBasic target, MapperContext context) in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Web\Models\Mapping\ContentPropertyMapDefinition.cs:line 46 at Umbraco.Core.Mapping.UmbracoMapper.<>c__DisplayClass8_02.<Define>b__1(Object source, Object target, MapperContext context) in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 83 at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context) in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 187 at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, MapperContext context) in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 135 at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source) in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 111 at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 677 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 179 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 469 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 173 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 703 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 179 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 469 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 173 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 95 at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) in //Src/Newtonsoft.Json/JsonSerializer.cs:line 1149 at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding) at System.Net.Http.Formatting.JsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding) at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content) at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken) — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Umbraco.Web.WebApi.AngularJsonMediaTypeFormatter.<WriteToStreamAsync>d__1.MoveNext() in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Web\WebApi\AngularJsonMediaTypeFormatter.cs:line 52 — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.WebHost.HttpControllerHandler.<WriteBufferedResponseContentAsync>d__22.MoveNext()

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
zpqrtbnkcommented, Apr 7, 2019

Have merged the PR but not entirely happy (see my note on the PR) about the context situation. It is way too error-prone.

So, re-opening the issue to try to find a better way.

1reaction
Shazwazzacommented, Apr 4, 2019

Thanks for reporting (vlatest) has done a lot of changes with how things are mapped so there must be a regression issue there. Will get this looked at!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker cant find local images on macbook m1 · Issue #3286
Description When building an image with a FROM local-image:latest statement with ... list of platforms of the form OS/architecture/variant.
Read more >
Cannot add a view Variant to a ListView
Open the ModelEditor. Expand any list view (e.g. DiagnosticInfoObject_ListView). Try to add a new Variant to the Variants node. Actual Results:
Read more >
ARM v8 add to Docker Image Manifest (#25951) · Issues
I have a aarch64 on broadcom v8 and Docker can't pull your arm64 image because it can't find "v8" in the manifest =)....
Read more >
Docker (Apple Silicon/M1 Preview) MySQL "no matching ...
I've tried :latest and :8 which result in the same error. It pulls phpmyadmin and wordpress fine. mysql · docker · apple-silicon.
Read more >
variant pricing
Now go to VK11 - Enter VA00 (Condition)(For Std RVA001 Pricing Procedure) - enter variant Red and Blue give the rates accordingly and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found