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

Matrix blocks are soft-deleted #3846

Closed
darylknight opened this issue Feb 14, 2019 · 3 comments
Closed

Matrix blocks are soft-deleted #3846

darylknight opened this issue Feb 14, 2019 · 3 comments

Comments

@darylknight
Copy link

Description

I have a site where each entry has a matrix field, and in that matrix field there's an Entries field which sets relations. Today the client deleted a matrix block, but the target element was still showing up on the page as being related. I ran garbage collection and the element disappeared. I'm therefore pretty sure that it was being caused by the matrix block getting soft-deleted. I don't know whether it's deliberate that matrix blocks are soft-deleted, but there's nowhere to see deleted matrix blocks to permanently remove them (and it's another step for the client.).

Is this a bug with soft-deletion, or a UI problem?

Steps to reproduce

  1. Set up a matrix block with an entries field and output the relations
  2. Delete the matrix block
  3. Relation still exists.

Additional info

  • Craft version: 3.1.11
  • PHP version: 7.2
  • Database driver & version: MySQL
@brandonkelly
Copy link
Member

Yep, the relatedTo param wasn’t taking soft-deleted Matrix blocks into account. Fixed for the next release.

If you need to get this fix right away, open composer.json and change your craftcms/cms requirement:

"require": {
  "craftcms/cms": "dev-develop#cb35dbbb03db63b0c49b35f436c7d1ce44c2ecc0 as 3.1.11",
  "...": "..."
}

Then run composer update from your terminal.

@brandonkelly
Copy link
Member

We just released 3.1.12 with the fix.

@darylknight
Copy link
Author

Thank you!

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

No branches or pull requests

2 participants