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.43k stars 2.67k forks source link

Valid mandatory Multinode Treepicker in nested block failed validation with error 'This property is invalid' #16755

Closed Wayne-Wai closed 3 weeks ago

Wayne-Wai commented 3 months ago

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

13.4.0

Bug summary

Validation failed with 'This property is invalid' for mandatory property of Multinode Treepicker data type in Umbraco.BlockGrid and Umbraco.BlockList nested block, even with content assigned to the property

Specifics

Validation for mandatory property of Multinode Treepicker works fine if the property is not in a nested block.

The workaround is to remove the mandatory status of the property, so the nested block can be created without validation error.

Steps to reproduce

  1. Create a data type of Umbraco.MultiNodeTreePicker (T1), specify a root node and allowed type.
  2. Create a document type (D1) and a 'mandatory' property (P1) from the new data type in step 1.
  3. Create a data type of either Umbraco.BlockGrid or Umbraco.BlockList (T2), add the new document type in step 2 to the available blocks.
  4. Create another document type (D2) and a property (P2) from the new data type in step 3.
  5. Create a content from the document type (D2) in step 4.
  6. Add a block to property P2, then add a content to P1.
  7. Error 'This property is invalid' displayed when trying to create the block.

Expected result / actual result

Mandatory check of Multinode Treepicker data type in Umbraco.BlockGrid and Umbraco.BlockList nested block should pass if it is valid.

github-actions[bot] commented 3 months ago

Hi there @Wayne-Wai!

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:

NguyenThuyLan commented 3 weeks ago

Hi @Wayne-Wai , thanks for reporting isssue. But I can't reproduce it. Please check the video I add below. I can add data to tree picker. Anyway, on step2, I think It should be element type instead of document type, because can not add document type to block grid / block list

https://github.com/user-attachments/assets/43eae1f5-be0f-42b5-96fc-75956780f0ad

I will close this issue. Please feel free to reopen if you have further more details 😊