Cms: Lightswitch in Matrix field deletes all matrix blocks upon save when enabled, deletes blocks site-wide with an enabled lightswitch

Created on 17 Sep 2019  路  5Comments  路  Source: craftcms/cms

Description

In my content blocks matrix filed, I have a lightswitch at the end of my biographies block which, in the code, adds an optional HR at the bottom of the block on the page. When you enable the lightswitch to use the feature, it deletes all content blocks from the matrix on that page, and on any other blocks with a lightswitch -- ACROSS THE ENTIRE SITE. There is no error. They just pull a houdini and vanish.

Steps to reproduce

  1. Create a matrix field type.
  2. Create a block that has a lightswitch and any other content.
  3. Attempt to make an entry, and enable the lightswitch field.
  4. Save and Continue Editing.
  5. The block you just created is gone, as are all blocks across the site with a lightswitch in the matrix field.

Additional info

  • Craft version: 3.3.4
  • PHP version: 7.3.7
  • Database driver & version: MySQL 8.0.16
  • Plugins & versions:
    Amazon SES | 1.2.0
    Calendar Links | 1.0.1
    Contact Form | 2.2.5
    Craft Color Mixer | 1.0.7
    DigitalOcean Spaces Volume | 1.1.2
    Feed Me | 4.1.2
    Field Manager | 2.1.0
    Fingerprint Assets | 1.0.1
    Imager | v2.2.0
    Linkit | 1.1.11
    Navigate | 2.4.3
    Range Slider Field for Sprout Forms | 1.0.6
    reCAPTCHA | 1.3.0
    Redactor | 2.4.0
    Redactor Custom Styles | 3.0.2
    Redactor Font Awesome | 2.1.1
    Smart Map | 3.2.2.1
    Smith | 1.0.0
    Sprout Fields | 3.4.4
    Sprout SEO | 4.2.2
    Store Hours | 2.1.1.1
    Super Table | 2.3.0
    Video Embedder | 1.1.4

Most helpful comment

We just released Craft 3.3.4.1 with a fix for this. Sorry for the inconvenience!

All 5 comments

The exact same thing just happened to one of our sites. Several hundred entries with matrix block and a Lightswitch appear to be missing after the update to v.3.3.4! Can you please help?

Interesting - I just had some issues with a few items too - and they were lightswitch fields. Just completely disappeared when I upgraded to 3.3.4. A rollback to 3.3.3 fixed the issue for me.

In our case downgrading to v.3.3.3 did fix the issue as well. In v.3.3.4 any entries with a Lightswitch regardless of whether they were in matrix blocks, would completely disappear. Thankfully it seems to be a query error.

We just released Craft 3.3.4.1 with a fix for this. Sorry for the inconvenience!

Well done, Brandon - you know I think you guys do terrific support...this time during travel

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelhue picture michaelhue  路  3Comments

darylknight picture darylknight  路  3Comments

RitterKnightCreative picture RitterKnightCreative  路  3Comments

timkelty picture timkelty  路  3Comments

angrybrad picture angrybrad  路  3Comments