Not a bug XF 1.5: Field 'tags' Does Not Have A Default Value

Snog

Well-known member
XF 1.5...

Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Field 'tags' doesn't have a default value - library/Zend/Db/Statement/Mysqli.php:214

This will affect anything that uses the datawriters for various purposes.
 
Last edited:
The only default structure to support tagging has a default value:
PHP:
            $data[$structure['table']]['tags'] = array('type' => self::TYPE_SERIALIZED, 'default' => 'a:0:{}');

What content type is throwing this error?
 
It appears to just be a simple database write that is triggering the error. At first I thought it was a datawriter causing it.

Code:
$db->query('
       INSERT INTO `xf_thread`
       (' . $fields . ')
       VALUES (' . $values . ')
     ');
 
If you're inserting into a table directly, it's something you'd need to handle. Using a datawriter handles this for you.
 
Top Bottom