Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server validation stops working when a Property (with a Block Grid editor) has Vary By Culture enabled #17753

Closed
AleksandrRogov opened this issue Dec 6, 2024 · 9 comments

Comments

@AleksandrRogov
Copy link

AleksandrRogov commented Dec 6, 2024

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

15.0.0

Bug summary

When "Vary by Culture" is enabled in a property with a Block Grid editor, server validation always returns "Valid" (200) result.

Specifics

Here's a page with a block grid that has a block with property that has a regular expression validation. If it's not valid it displays an error message. But it only works when the "Body" does not have "Vary By Culture" enabled:

2024-12-06_17-28-52

Steps to reproduce

  1. Create a document type (with template) "Page" that will have a property "Body" with a block grid editor.
  2. "Page" should have "Allow Vary by Culture" enabled to make "Vary By Culture" visible in a block grid property.
  3. "Page" should also be allowed at root.
  4. Create an Element Type with a text property "Text Field".
  5. Edit the "Text Field" and set a "Custom Validation" to "Validate as an email address" (as an example) and add a custom text message to the validation.
  6. To a block grid data type used in step 1, add a Block by using an Element Type from step 4.
  7. Go to the "Content" section and create a new content item "Page"
  8. Add a block created in the step 6 and type some text in a "Text Field".
  9. Publish and Save the Content item. The result should be an Error message.
  10. Go to the "Settings" section and edit the "Page" document type.
  11. Edit "Body" property and enable "Vary by Culture".
  12. Save the document type.
  13. Go back to the "Content" section and edit the page.
  14. Edit "Text Field" in the block.
  15. Publish and Save the Content item. It will not show the validation message anymore.

Expected result / actual result

Validation message should be shown when the property valid is invalid when the Block Grid property has "Vary by Culture" enabled / Validation does not get executed properly and always returns "Valid" result, even though the property value is invalid.


This item has been added to our backlog AB#49565

Copy link

github-actions bot commented Dec 6, 2024

Hi there @AleksandrRogov!

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

@NguyenThuyLan
Copy link
Contributor

Hi @AleksandrRogov , it seems to be fixed on v15.1.0-rc, please check the video below, Feel free to reopen if you can reproduce it
https://github.com/user-attachments/assets/5b4b85eb-f81b-4dc6-be47-5a0144fad584

@AleksandrRogov
Copy link
Author

@NguyenThuyLan Still does not work in v15.1.0-rc2. The Block Grid should have "Vary by Culture" enabled, not just the content item that hosts the Block Grid (I mentioned that in the repro steps).

2024-12-09_10-43-30

Also, it does not look like I can re-open issues, please re-open it for me. Thank you.

@NguyenThuyLan
Copy link
Contributor

Oh, sorry @AleksandrRogov , I will check it again

@NguyenThuyLan NguyenThuyLan reopened this Dec 10, 2024
@NguyenThuyLan
Copy link
Contributor

NguyenThuyLan commented Dec 11, 2024

Hi @AleksandrRogov , I think the issue #17764 could related to your issue, something is wrong with the custom validation.

Umbraco.-.Google.Chrome.2024-12-11.12-03-40.mp4

Btw, I couldn't publish the content as the video above, but there still be a bug with the custom validation here

@AleksandrRogov
Copy link
Author

@NguyenThuyLan I assume, you could not publish the content item is because you had a custom validation on a block editor property ("Body") in your document type. (The screenshot is from your video)

image

@nielslyngsoe
Copy link
Member

nielslyngsoe commented Feb 23, 2025

I did a bit of investigation and it turns out that its the Server not responding to this invalid field.

In the following case I have set the requirement of the Field of the Block to be Numeric. And the Validation end-point does not complain about this...

Image

Therefor I will tag with as a backend issue.

@nielslyngsoe nielslyngsoe added area/backend state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks and removed area/frontend labels Feb 23, 2025
@kjac kjac self-assigned this Feb 24, 2025
@kjac
Copy link
Contributor

kjac commented Feb 24, 2025

Thanks for reporting this @AleksandrRogov 💯

This seems to affect all block editors. PR to fix in #18438

@kjac
Copy link
Contributor

kjac commented Feb 25, 2025

Fixed in #18438 for 15.3 👍

@kjac kjac closed this as completed Feb 25, 2025
@iOvergaard iOvergaard removed the state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants