Creating a taxonomy item and selecting "root" as a parent should have the same result as not selecting any parent.

Doing so shows a fatal error page:

PDOException: INSERT INTO {term_hierarchy} (tid, parent) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1) - Array ( [:db_insert_placeholder_0] => 4 [:db_insert_placeholder_1] => ) SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'parent' at row 1 in taxonomy_term_save() (line 359 of modules/taxonomy/taxonomy.module).

Suggested fix: Give "root" a key of 0 rather than "", to avoid a type mismatch.

Comments

cburschka’s picture