Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
taxonomy.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2008 at 12:04 UTC
Updated:
9 Nov 2008 at 17:55 UTC
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
Comment #1
cburschkacatch has uploaded patch at #332145: UNSTABLE-3 blocker: taxonomy_form_term_submit passes empty string as parent [dbtng conversion regression].