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.4.5]: Entry save fails and matrix block disappears when a conditional field is present on the entry #12973

Closed
mike-moreau opened this issue Mar 23, 2023 · 4 comments
Assignees

Comments

@mike-moreau
Copy link

What happened?

Description

When attempting to save a new entry, the first save fails and a matrix block is lost if the entry contains a conditional field.

Steps to reproduce

  1. Create a section with a matrix field and a conditional text field. The matrix field should have min blocks 1 and max blocks 1.
  2. Set the conditional text field to a setting that will cause it not to show. Should show matrix field only.
  3. Attempt to save a new entry.
  4. The first save will fail, but the second save will succeed.

Expected behavior

First save to succeed.

Actual behavior

Save fails and data loss on matrix block.

Screenshot 2023-03-23 at 1 58 07 PM

Screenshot 2023-03-23 at 1 57 31 PM

Screenshot 2023-03-23 at 1 57 40 PM

Screenshot 2023-03-23 at 1 58 21 PM

Screenshot 2023-03-23 at 1 58 28 PM

Craft CMS version

4.4.5

PHP version

8.2

Operating system and version

MacOS 13.2.1

Database type and version

MYSQL 5.7

Image driver and version

No response

Installed plugins and versions

  • None
@i-just
Copy link
Contributor

i-just commented Mar 27, 2023

Hi, thanks for reporting. I submitted a PR to address this.

@brandonkelly
Copy link
Member

Fixed for the next release via #12983.

@brandonkelly
Copy link
Member

Craft 4.4.6 is out now with that fix 🎉

@mike-moreau
Copy link
Author

Thank you!

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

3 participants