-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V8: Can't show list views for variant content on latest #5163
Comments
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! |
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. |
Agreed. It works for now but let's see if there's a way to work around the potential context issue. |
Want to have a look at PR #5182? I think it's way safer this way: the context does just not expose the mapper at all, and is a mapper in itself, so if you need to nest mappings, you have to use the context. |
Will give it a look in an hour or so when I can get to a computer 👍 but it sounds like the right approach. |
PR merged, keeping the issue open for a bit of testing, and then will close. |
Looks good with the changes in #5182 |
thanks! |
There's something funky going on. I have a culture variant content type with list view enabled. On latest source (d0b9fb7) this results in:
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 whenAngularJsonMediaTypeFormatter
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.ContentPropertyBasicMapper
1.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_0
2.b__1(Object source, Object target, MapperContext context) in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 83at 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.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.d__22.MoveNext()
The text was updated successfully, but these errors were encountered: