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

[4.x]: Validation error on save on non required fields #11574

Closed
jesuismaxime opened this issue Jul 7, 2022 · 8 comments
Closed

[4.x]: Validation error on save on non required fields #11574

jesuismaxime opened this issue Jul 7, 2022 · 8 comments

Comments

@jesuismaxime
Copy link

What happened?

Description

An issue that first appear with Neo seems to came from Craft.

If we downgrade Craft CMS from v4.1.0.2 (or v4.1.3) to v4.0.6, everything works fine. The issue appear in 4.1.0.

spicywebau/craft-neo#618

Craft CMS version

4.1.0

PHP version

8.1.7

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

No response

@brandonkelly
Copy link
Member

Nothing changed related to field validation in 4.1.0 so I’m not sure what this could be off the top of my head. If you send a database backup and Composer files to support@craftcms.com, and point out exactly where the issue is occurring, we can look into it from there.

@jesuismaxime jesuismaxime changed the title [4.x]: [4.x]: Validation error on save on non required fields Jul 9, 2022
@jesuismaxime
Copy link
Author

Here's an update. I tried with a fresh database and it seem to work fine. But the issue is that starting with a fresh database is kind of not an option; the site is still in staging, but have real content added to some entries.

I'll send you the composer/old database(the one that still have the issue) if it may help us avoiding a fresh database.

@brandonkelly
Copy link
Member

Thanks. It could definitely be a bug – it just may only occur in very specific circumstances. We should be able to identify it with those files.

@jesuismaxime
Copy link
Author

jesuismaxime commented Jul 9, 2022

Files sent. I also include a screencast (to reproduce the issue) since most labels are in French

@brandonkelly
Copy link
Member

Thanks! I was able to reproduce with your files. Turns out it was due to the same Libellé field being used in another context, and its required state was bleeding over into Mise en page → Section → Lien. Fixed for the next release.

@jesuismaxime
Copy link
Author

This what I suspected, although removing all required occurrences for that field (label) didn't fix the issue locally. @brandonkelly do you have an estimate/timeframe for this release so we can update our sprints?

(Thank you again!)

@brandonkelly
Copy link
Member

brandonkelly commented Jul 11, 2022

Most likely tomorrow, but you can get the fix immediately by changing your craftcms/cms requirement in composer.json to "dev-develop as 4.1.3" and running composer update.

@brandonkelly
Copy link
Member

Craft 4.1.4 is out now with that fix.

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

2 participants