umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.42k stars 2.67k forks source link

Umbraco 9 Nested Content #11705

Closed thomashdk closed 1 year ago

thomashdk commented 2 years ago

Which exact Umbraco version are you using? For example: 9.0.1 - don't just write v9

9.1.1

Bug summary

After upgrading to Umbraco 9, some of the nested content the fields are not showing.

Specifics

When unfolding some of the nested content I get this:

image

But should look like this:

image

Getting these errors:

System.NullReferenceException, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e: Object reference not set to an instance of an object.

And

at Umbraco.Cms.Core.PropertyEditors.NestedContentPropertyEditor.NestedContentValidator.GetElementTypeValidation(Object value)+MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Umbraco.Cms.Core.PropertyEditors.ComplexEditorValidator.Validate(Object value, String valueType, Object dataTypeConfiguration) at Umbraco.Cms.Core.PropertyEditors.DataValueEditor.<>c__DisplayClass17_0.<Validate>b__0(IValueValidator v) at System.Linq.Enumerable.SelectManySingleSelectorIterator2.ToList() at Umbraco.Cms.Core.PropertyEditors.DataValueEditor.Validate(Object value, Boolean required, String format) at Umbraco.Cms.Core.Services.Implement.PropertyValidationService.ValidatePropertyValue(IDataEditor editor, IDataType dataType, Object postedValue, Boolean isRequired, String validationRegExp, String isRequiredMessage, String validationRegExpMessage)+MoveNext() at Umbraco.Cms.Web.BackOffice.Filters.ContentModelValidator3.ValidatePropertyValue(TModelSave model, TModelWithProperties modelWithProperties, IDataEditor editor, ContentPropertyDto property, Object postedValue, ModelStateDictionary modelState) at Umbraco.Cms.Web.BackOffice.Filters.ContentModelValidator3.ValidatePropertiesData(TModelSave model, TModelWithProperties modelWithProperties, ContentPropertyCollectionDto dto, ModelStateDictionary modelState) at Umbraco.Cms.Web.BackOffice.Filters.ContentSaveValidationAttribute.ContentSaveValidationFilter.OnActionExecutingAsync(ActionExecutingContext context) at Umbraco.Cms.Web.BackOffice.Filters.ContentSaveValidationAttribute.ContentSaveValidationFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

And this:

image

I have looked a the nested content fields to find out if it's only nested content with specific fields, but it's not consistent

Steps to reproduce

After opgrading an Umbraco 8.16.0 to a 9.0.1 we had the issue. Have now updated to 9.1.1 and still same issue.

Expected result / actual result

Expected the Nested content fields to show the fields

thomashdk commented 2 years ago

When I try to publish a node that has some Nested content elements that has that issue I get this:

image

thomashdk commented 2 years ago

I'm pretty stuck here and can't get our clients sides out on then new version...

thomashdk commented 2 years ago

Finally figured it out.

On my v8 tab that are a element, I had translations on them like this.

image

v9 don't like that in the nested content. When I remove # then it works...

kjac commented 1 year ago

Hi @thomashdk,

Sounds like you've been on quite the investigation task here. Thanks for reporting it - and sorry for the late response.

I can reproduce this on V10, we need to have a look at what's going on here.

This issue however is a duplicate of https://github.com/umbraco/Umbraco-CMS/issues/11693 ... I will close this one and cross reference them.