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]: Modified matrix entries don't get updated after adding or deleting an entry to the matrix #15069

Closed
Liamm3 opened this issue May 24, 2024 · 2 comments
Assignees
Labels

Comments

@Liamm3
Copy link

Liamm3 commented May 24, 2024

What happened?

Description

We use a matrix field as our content builder. When we edit an existing entry in the matrix, then add a new one or delete an existing one and then save the entry, all changes are lost.

Steps to reproduce

  1. Create a new matrix field

  2. Add some entry types (e.g. 'Plain Text')

  3. Add the matrix field to a section

  4. Create a new entry in the section

  5. Add an entry to the matrix area_576

  6. Save the entry using Ctrl+S

  7. Modify the created entry

  8. Add a new entry to the matrix
    area_580

  9. Save again

  10. All the changes are lost
    area_579

Expected behavior

The modified matrix entry should be saved after saving the entry.

Actual behavior

Changes on a modified entry are lost, after adding a new entry to the matrix.

Craft CMS version

5.1.6

PHP version

8.3

Operating system and version

Linux

Database type and version

MariaDB 10.6

Image driver and version

No response

Installed plugins and versions

  • CKEditor 4.0.6
  • Dumper 5.0.1
  • SEO v5.0.0-rc2
@i-just
Copy link
Contributor

i-just commented May 28, 2024

Hi, thanks for reporting. I was able to replicate this if the autosaving of e.g. the text change wasn’t processed before adding a new entry. If you were to wait until after autosaving is done, all the changes would save correctly. I raised a PR for this.

@brandonkelly
Copy link
Member

Craft 5.1.8 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