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]: Matrix & NEO Block Validation fails when autosaveDrafts is deactivated #11731

Closed
maxstrebel opened this issue Aug 2, 2022 · 3 comments

Comments

@maxstrebel
Copy link

maxstrebel commented Aug 2, 2022

What happened?

Description

Because of regular Mutex Lock /saving problems we had to deactivate autosaveDrafts. Since some time (we cannot pin it down unfortunately) we see problems with Matrix and NEO Block validation and in general when saving entries.

In this very case, saving will first show a notice it can't save but no validation message at the block in question, when a required field is missing. Second save, with the missing block, will then save – but will delete the block. It won't validate (as it does when autosaveDrafts is active).

Steps to reproduce

  1. Set "autosaveDrafts" => false in general.php.
  2. Create a new matrix field
  3. Add a required text field to matrix
  4. Create a new entry
  5. Add a matrix (or NEO) block and the created, required text field but leave the content empty
  6. See toast with info that entry could not be created, but no validation on the field
  7. Save again
  8. Will now remove the empty block and show success

image

image

Expected behavior

Blocks should validate, no matter if autosaveDrafts is deactivated.

Actual behavior

Block will not show validation message. Block will vanish on second save.

Craft CMS version

4.2.0.2

PHP version

8.0.20

Operating system and version

MacOS Monterey 12.5

Database type and version

MySQL (mariadb 10.5.13)

Image driver and version

Imagick 3.7.0 (ImageMagick 7.1.0-35)

Installed plugins and versions

  • NEO 3.x-dev
  • Redactor 3.0.2
@brandonkelly
Copy link
Member

Thanks for reporting those! Both are fixed for the next release.

@maxstrebel
Copy link
Author

Thanks Brandon, appreciate it!

@brandonkelly
Copy link
Member

Craft 4.2.1 is out 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