Craft throwing an SQL error on Save when Matrix field has a lightswitch Since updating to 2.2.2587, anytime I edit an entry by adding a block on certain Matrix fields, it throws the following error:

Internal Server Error

CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'field_text_markdown' cannot be null


It seems to throw the error if any of the blocks in that field contain a lightswitch field. It doesn't matter if the block with the lightswitch is actually added to the entry or not. In this case, my Matrix contains two switches, which are off by default.

Throws the error whether the blocks with the switches are present or not… and doesn't seem to matter if I add the blocks with the switches and turn them on or off.

Cheers!
Fixed in Craft 2.2 build 2588!