biblio_save_node() creates a new node when it imports a biblio item and later saves it with node_save(). It fails however to set some of the node object with the proper type (promote, moderate, sticky, status) which causes some nasty behavior upon saving. For example when importing a biblio node with some taxonomy terms, you might get SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'sticky' at row 1: INSERT INTO {taxonomy_index} (nid, tid, sticky, created) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3);
because sticky is not set.
Comment | File | Size | Author |
---|---|---|---|
#1 | 972312_1_bibliocast.patch | 1.15 KB | scor |
Comments
Comment #1
scor CreditAttribution: scor commentedComment #2
scor CreditAttribution: scor commentedFixed this with http://drupal.org/cvs?commit=451334
In the long run it would be probably cleaner to call node_object_prepare() which would saves us a few lines of code in biblio_save_node() and avoid duplicating that logic.
Comment #3
scor CreditAttribution: scor commentedsetting to needs work to evaluate the node_object_prepare() approach.
Comment #4
scor CreditAttribution: scor commentedmarked #952354: Biblio node_options do not follow core definitions as duplicate:
Comment #5
rjerome CreditAttribution: rjerome commentedI've implemented node_object_prepare in biblio_save_node()
http://drupalcode.org/project/biblio.git/commit/9d8f096
Ron.