<p>Fixed in <a href="http://buildwithcraft.com/updates#build2588" rel="nofollow">Craft 2.2 build 2588</a>!</p>

CC BY-SA 3.0
2014-09-24T00:43:54.490Z
Thank ya! Works perfectly again.
Travis Gertz
CC BY-SA 3.0
2014-09-24T00:41:45.223Z
2014-09-24T00:41:45.223Z
Brandon Kelly
<p>Since updating to 2.2.2587, anytime I edit an entry by adding a block on certain Matrix fields, it throws the following error:</p>

<pre><code>Internal Server Error

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

<p>It seems to throw the error if <em>any</em> 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.</p>

<p>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.</p>

<p>Cheers!</p>

CC BY-SA 3.0
2014-09-24T00:12:57.490Z
This is going to end up being a bug with a change in the last update. Can you submit a ticket from your dashboard's Get Help widget and let it send along the database?
Brad Bell
<matrix><entry><error-message>
Craft throwing an SQL error on Save when Matrix field has a lightswitch
# Craft throwing an SQL error on Save when Matrix field has a lightswitch

(Asked by: username_0 on 2014-09-24)

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!

**Tags:** matrix, entry, error-message
> **Comments:**
> **username_1**: This is going to end up being a bug with a change in the last update. Can you submit a ticket from your dashboard's Get Help widget and let it send along the database?  

---

## 1 answers

### Answer by username_2 on 2014-09-24. Score: 1 | Accepted answer

Fixed in [Craft 2.2 build 2588](http://buildwithcraft.com/updates#build2588)!

> **Comments:**
> **username_0**: Thank ya! Works perfectly again.  

---

