taxonomy_update_7005() makes an assumption that sticky field has only boolean values:
// Update the {taxonomy_index} table.
db_insert('taxonomy_index')
->fields(array('nid', 'tid', 'sticky', 'created',))
->values(array($record->nid, $record->tid, $record->sticky, $record->created))
->execute();
}
(taxonomy.install, starting from line 769)
Schema definition:
$schema['taxonomy_index'] = array(
'description' => 'Maintains denormalized information about node/term relationships.',
'fields' => array(
...
'sticky' => array(
'description' => 'Boolean indicating whether the node is sticky.',
'type' => 'int',
'not null' => FALSE,
'default' => 0,
'size' => 'tiny',
However, sticky field in {node} table is of type int (not tiny int), and contrib modules may set arbitrary int values (this is not theoretical assumption).
Attached patch solves the problem by adjusting {taxonomy_index}.sticky field size
Possible other solution: make {node}.sticky tiny int or force taxonomy_update_7005 to use int=>bool conversion when inserting into {taxonomy_index}
This issue is not relevant for 8.x, so opening it directly for 7.x
Comment | File | Size | Author |
---|---|---|---|
taxonomy_update_7005_adjust_sticky_size.patch | 462 bytes | valthebald | |