1. 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

Discussion in 'Resolved Bug Reports' started by Snog, Aug 19, 2015.

  1. Snog

    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: Aug 19, 2015
  2. Jeremy

    Jeremy Well-Known Member

    The only default structure to support tagging has a default value:
                $data[$structure['table']]['tags'] = array('type' => self::TYPE_SERIALIZED'default' => 'a:0:{}');
    What content type is throwing this error?
  3. Snog

    Snog Well-Known Member

    It appears to just be a simple database write that is triggering the error. At first I thought it was a datawriter causing it.

           INSERT INTO `xf_thread`
           (' . $fields . ')
           VALUES (' . $values . ')
  4. Mike

    Mike XenForo Developer Staff Member

    If you're inserting into a table directly, it's something you'd need to handle. Using a datawriter handles this for you.
  5. Snog

    Snog Well-Known Member

    Yes, like I said I thought it was the datawriter. It's not a bug in XF.

Share This Page