Closed PeterKvayt closed 1 year ago
Hi there @PeterKvayt!
Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.
We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.
Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:
Hi @PeterKvayt 👋 Thanks for reaching out and for the detailed steps for reproducing your issue 💪 When I tried your scenario on a fresh Umbraco 11.3 installation, I was getting validation errors that point to the problem pretty clearly, as you can see in the video below. Wasn't it the same for you or perhaps I am missing something?
Hi @elit0451! Yes, you are right, it's works fine, may be it was my fault. I will investigate it more deeply later. Anyway thanks!
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
11.3.0
Bug summary
When I have 2 compositions, which are already used in one doc type and I add property to composition with the same property alias which already exists in other used composition, I got an exception with stack trace.
It would be great to get nice error page with explanation why we can't save composition with this property.
Specifics
I did not test this case in other versions, but Im quite sure that this will reproduced in 10.x version
at System.Linq.ThrowHelper.ThrowNoMatchException() at System.Linq.Enumerable.Single[TSource](IEnumerableg__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
1 source, Func
2 predicate) at Umbraco.Cms.Web.BackOffice.Controllers.ContentTypeControllerBase1.AddCompositionValidationErrors[TContentTypeSave,TPropertyType](TContentTypeSave contentTypeSave, IEnumerable
1 duplicatePropertyTypeAliases, IEnumerable1 invalidPropertyGroupAliases) at Umbraco.Cms.Web.BackOffice.Controllers.ContentTypeControllerBase
1.CreateCompositionValidationExceptionIfInvalid[TContentTypeSave,TPropertyType,TContentTypeDisplay](TContentTypeSave contentTypeSave, TContentType composition) at Umbraco.Cms.Web.BackOffice.Controllers.ContentTypeControllerBase1.PerformPostSave[TContentTypeDisplay,TContentTypeSave,TPropertyType](TContentTypeSave contentTypeSave, Func
2 getContentType, Action1 saveContentType, Action
1 beforeCreateNew) at Umbraco.Cms.Web.BackOffice.Controllers.ContentTypeController.PostSave(DocumentTypeSave contentTypeSave) at lambda_method3740(Closure, Object, Object[]) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() --- End of stack trace from previous location --- 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.Steps to reproduce
Expected result / actual result
Expected result: there is an error message that we create property with the same alias name with already exists in used doc type.
Actual result: there is an exception while trying to save changes.