Skip to content

Property set to mandatory and using MNTP validates as invalid inside block #14484

@bjarnef

Description

@bjarnef
Contributor

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

11.4.1

Bug summary

I added a property using MTNP inside a block inserted in Block Grid editor and the property is configured as mandatory, but on save it validates as invalid even though a node is selected.

image

Specifics

No response

Steps to reproduce

Add a property to a block element using MNTP and set property to mandatory.
Insert the block in Block Grid and try to save or save & publish node.

Expected result / actual result

No response

Activity

github-actions

github-actions commented on Jun 30, 2023

@github-actions

Hi there @bjarnef!

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'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

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 🤖 🙂

elit0451

elit0451 commented on Jul 3, 2023

@elit0451
Contributor

Hey @bjarnef 👋

Thanks for reaching out. Unfortunately, I can't reproduce the issue. Can you have a look at this video and let me know what I am missing?

MNTP-mandatory-prop.mov
added
state/needs-more-infoWe don't have enough information to understand and/or give a good reply
state/needs-investigationThis requires input from HQ or community to proceed
on Jul 3, 2023
bjarnef

bjarnef commented on Jul 4, 2023

@bjarnef
ContributorAuthor

Hi @elit0451

Odd I could reproduce it again - this time inside Block List.

chrome_vaIrgpdbMx.mp4

It seems to happen when I have existing content and and added a property "Site" using MNTP and set as mandatory.

Hitting save & publish then mark errors at all items, since none of them have value in "Site" property, but selecting a value doesn't invalidate the property on first attempt - I have to remove the selected item and select it once again and then the error disappears from the property and I can submit/close the overlay.

elit0451

elit0451 commented on Jul 5, 2023

@elit0451
Contributor

I managed to reproduce this now - it happens when you have existing content for the element type and you add ANY mandatory field. Saving and publishing will result in the "Value cannot be null" validation error even when you have filled out the mandatory field.

Screenshot 2023-07-05 at 08 30 47

I will mark this as up for grabs in case someone wants to give it a try. The workaround is to add the property as a non-mandatory, fill out the content and then make it mandatory.
github-actions

github-actions commented on Jul 5, 2023

@github-actions

Hi @bjarnef,

We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post.

Thanks muchly, from your friendly Umbraco GitHub bot :-)

bjarnef

bjarnef commented on Jul 5, 2023

@bjarnef
ContributorAuthor

Yes, it with MNTP the workaround is to remove the item selected first time and select it again. On second selection the validation is updated the be valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bjarnef@elit0451

        Issue actions

          Property set to mandatory and using MNTP validates as invalid inside block · Issue #14484 · umbraco/Umbraco-CMS