[NOT_REPRODUCIBLE] The "field is required" validation is incorrectly triggered in Draft versions

I have…

  • Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.

I’m submitting a…

  • Regression (a behavior that stopped working in a new release)
  • Bug report
  • Performance issue
  • Documentation issue or request

Current behavior

The “field is required” validation is being applied when it should not be.

Steps to recreate:

  1. Set the field validation to Required when publishing.
  2. Fill in the content for this field and save.
  3. Remove the content from this field and save.

You receive the validation error “field is required,” even though it should not appear, as the version is still in Draft.

Expected behavior

No validation is applied

Minimal reproduction of the problem

Environment

  • Self hosted with docker
  • Self hosted with IIS
  • Self hosted with other version
  • Cloud version

Version: [VERSION]

Browser:

  • Chrome (desktop)
  • Chrome (Android)
  • Chrome (iOS)
  • Firefox
  • Safari (desktop)
  • Safari (iOS)
  • IE
  • Edge

Others:

Good catch. I will have a look.

1 Like

Now I am confused. Are you talking about

“Required”
or
“Required when publishing”?

The first one is always checking for fields. The second only when the content is either published or moved to publish status.

Required on publishing.
I noticed that this error no longer appears in the cloud. Has it been fixed?

Not recently. I can also not reproduce it, therefore I am a little bit confused.

Is there any update on this issue? I’m currently facing the same problem when trying to migrate my projects from the cloud to a self-hosted environment.

I remember experiencing this myself and we ended up removing the “required on publishing” validation and using custom validation script to reject the update if it was empty when publishing. That would have been on version 7.2.0, I think we still have that version deployed so I will test it out and let you know.

Edit: Ah we have 7.8.1 deployed now and I cannot recreate this issue so was presumably fixed at some point between 7.2.0 (or perhaps earlier) and 7.8.1. What version do you have self hosted out of interest?

Similar issue raised earlier this year:

I am currently on squidex/squidex:7.15.0 version. Should I upgrade that, can you provide a link to the newest build?

Ah right perhaps this is a regression, unsure what version is deployed to the cloud atm. Nothing obvious I can see in recent commits after v7.15.0 that would fix this bug.