• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

Snog

Well-known member
#1
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:

Jeremy

Well-known member
#2
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?
 

Snog

Well-known member
#3
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 . ')
     ');
 

Mike

XenForo developer
Staff member
#4
If you're inserting into a table directly, it's something you'd need to handle. Using a datawriter handles this for you.