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

[5.x]: Able to save entry with a matrix field entry that does not meet validation requirements #15536

Closed
jasonlav opened this issue Aug 14, 2024 · 2 comments
Assignees
Labels

Comments

@jasonlav
Copy link

jasonlav commented Aug 14, 2024

What happened?

Editors are able to save content to a matrix field that does not pass validation.

Description

When editing content in a specific order (see steps to reproduce) it is possible to save an entry that contains a matrix field with an entry that does not meet validation.

Steps to reproduce

  1. Create an new section ("Post") and associated entry type ("Blog Post").
  2. Create a new matrix field ("Links") and associated entry type ("Link"). The "Link" entry type should have a title and at least one other required field.
  3. Add the "Links" matrix field to the "Blog Post" entry type.
  4. Create a "Blog Post" entry in the "Post" section with a title of "First Blog Post". Fill out any required fields, leave the "Links" matrix blank. Save it.
  5. Edit "First Blog Post." Add a "Link" to the "Links" field. Only fill out the title with "First link", leaving the other required fields blank. Do not save the entry, but click "Back" in your browser.
  6. Edit "First Blog Post." Note that "First link" does not appear in the "Links" matrix field. Also note that the "First Blog Post" entry is marked "edited." Save the post.
  7. Edit "First Blog Post." "First link" appears in the "Links" matrix field, although the "Link" entry does not pass validation.

Expected behavior

An entry should not be saved if it does not pass validation, including related matrix field entries.

Actual behavior

Entry is saved, despite it not passing validation of the matrix field entries.

Craft CMS version

5.3.4

PHP version

8.2.22

Operating system and version

Linux 4.18.0-553.16.1.el8_10.x86_64

Database type and version

MariaDB 10.6.19

Image driver and version

GD 8.2.22

Installed plugins and versions

Amazon S3 2.2.1
Bugsnag 5.0.0
CKEditor 4.1.0

@brandonkelly
Copy link
Member

Thanks for reporting that! Fixed now for the next release.

@brandonkelly
Copy link
Member

Craft 5.3.6 is out with that fix. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants