Cms: Matrix block gets deleted after disabling it

Created on 18 Jan 2018  Â·  15Comments  Â·  Source: craftcms/cms

Description

When disabling a Matrix field and saving the entry, the Matrix field gets deleted. There is no way to enable it again – except reverting to a recent revision.

Steps to reproduce

  1. Set Matrix field to disabled
  2. Save page (cmd+s)
  3. Matrix field was deleted, not hidden

Additional info

  • Craft version: v3 RC6
  • PHP version: 7.0.27
  • Database driver & version: MySQL 5.7.20
  • Plugins & versions: Asset Rev v6.0.0, CKEditor 1.0.0-beta.2, Command Palette 3.1.0, Redactor 1.0.1

craft-3-rc6

bug

Most helpful comment

Thanks guys, that ended up being a Super Table issue (verbb/super-table#288). Just submitted a PR that fixes it.

All 15 comments

Unfortunately we were not able to reproduce this. Can you send in a support ticket to [email protected] with a database backup so we can try with your DB?

I noticed the same problem on a website with Craft RC6. Disabled blocks of matrix fields are deleted when saving the page. It is interesting that it does not appear on another website (also Craft 3 RC6). The difference is that one website is multilingual (where the problem occurs) and the other is not.

Ah thanks @abinggeli! Able to reproduce it now.

And fixed. Thanks guys.

Similar problem in Craft CMS 2.6.3019

Works fine in the default en_US environment/locale. But when using other locale the block disappears instantly when disabled (not when saving).

@herrajon Sounds unrelated. Can you please post a new issue with specific steps to reproduce?

Will do

@brandonkelly No need to worry

I am using a plugin, Matrix Colors to color my matrix blocks. That is all good. But.

A little bogus there. I had some old definitions inside the plugin; The colors for the matrix blocks are define by the blocktype there. Some blocktypes no longer existing where defined.

I removed those old definitions and voila. My lost and I thought deleted blocks reappeared.

Things back to normal. Now you only need to worry about 7.714 things.

Hah! Glad you got it sorted :) You may want to submit an issue the bug at the Matrix Colors repo though.

Hi all, we have the same issue now - running Craft Pro 3.1.33

Same issue also on Craft 3.2.7

@DavidKabelitz @juliansthl What plugins do you guys have installed?

@brandonkelly

We're using Super Table and the matrix field is a "subfield" of the Super Table…

  • Craft version: Craft Pro 3.2.7
  • PHP version: 7.3.3
  • Database driver & version: MySQL 5.7.25

Plugins & versions:

  • Amazon S3 | 1.2.4
  • Control Panel CSS | 2.2.0
  • CraftQL | dev-master
  • Entries Subset | 1.2.1
  • Expanded Singles | 1.0.7
  • Field Manager | 2.1.0
  • Imgix | 2.0.4
  • Redactor | 2.3.3.2
  • Spoon | 3.3.7
  • Super Table | 2.2.1
  • Webhooks | 2.1.0

Hi @brandonkelly those are on our list:
In our case the matrix field is also a sub of a Super Table

Craft Pro 3.1.33

  • Contact Form | 2.2.5
  • Contact Form Extensions | 1.1.6
  • Contact Form Honeypot | 1.0.2
  • Embedded Assets | 2.0.9
  • MobileDetect | 1.0.2
  • Olivemenus | 1.0.9
  • Redactor | 2.3.3.2
  • SEO | 3.5.4
  • Super Table | 2.1.20
  • Tags | 1.0.5

Thanks guys, that ended up being a Super Table issue (verbb/super-table#288). Just submitted a PR that fixes it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelhue picture michaelhue  Â·  3Comments

rynpsc picture rynpsc  Â·  3Comments

brandonkelly picture brandonkelly  Â·  3Comments

leigeber picture leigeber  Â·  3Comments

michel-o picture michel-o  Â·  3Comments