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.45k stars 2.68k forks source link

[14.1.1] Invalid composition when using nested document types #16872

Open mattbrailsford opened 2 months ago

mattbrailsford commented 2 months ago

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

14.1.1

Bug summary

When migrating a site from v13 to v14 where nested document types are in use, when attempting to save changes to said document type I receive the error "Invalid composition - The specified document type composition is invalid".

I believe this is due to that fact that nestable document types have not yet been implemented in v14. Whilst that is being implemented, I think we should at least update the validation logic to allow nested document types to ensure changes can be saved.

Specifics

No response

Steps to reproduce

Expected result / actual result

At the very least it should be possible to save changes on such a setup, but it would also be nice to be able to create nested document types again (or if not, some way of migrating away from nested document types)


This item has been added to our backlog AB#44592

elit0451 commented 2 months ago

Hey Matt,

Unfortunately, I wasn't able to reproduce the error on an upgrade from 13.4.1 to 14.1.1. Can you check my setup and let me know if I'm missing a step? 🙂

https://github.com/user-attachments/assets/0ade654d-3914-4eeb-839c-bd1c53bc8576

elit0451 commented 2 months ago

Oops,

I noticed that I changed the nested doc type, as opposed to the parent one as you suggested, so here is the requested flow (still successful on my end):

https://github.com/user-attachments/assets/9d8ae167-6630-4086-90e6-2077d8c7d78a

mattbrailsford commented 2 months ago

I think it could be an issue where nested and inherited element types are used at the same time. You can try the UC demo store if you want to see the issue in an install https://github.com/umbraco/Umbraco.Commerce.DemoStore/tree/feature/v14

In here, if you save the Product Page document type, it will throw an exception. This is both nested, and inherits an element type.