if i want to add multiple comma-separated terms to an entry, they won't get entered in the database in a correct way because the term_node table is incorrectly linked to term_data table, showing multiple errors while inserting new terms.

i got it to work work by adding an auto_increment key column to term_node (so now you can really have multiple terms linked to a node) and changed the php a bit of taxonomy.module so that the taxonomy_save_term function passes back the real Id's of the just created terms in node_term.

i never used cvs, so i'll get used to it next days. i'm trying to set up a nice community site integrated with www.kunstonline.info and base it on the drupal source (not wanting to reinvent the water - prefering to contribute to the sea - although my own very similar node-based project with an all media-uploader was rather close to finish - later these days i'll try to mix the media.module with my source to see if it gets to what i need)

okay

i just attach the changes then :

1/ the changed taxonomy.module : changed taxonomy_save_term($edit) and taxonomy_node_save($nid, $terms)

2/ the changed database structure for term_node table


-- --------------------------------------------------------

-- 
-- Table structure for table `term_node`

`term_node` (
  `tnid` int(10) NOT NULL auto_increment,
  `nid` int(10) unsigned NOT NULL default '0',
  `tid` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`tnid`),
  KEY `nid` (`nid`),
  KEY `tid` (`tid`)
)

hope this works for you too and see you soon_

CommentFileSizeAuthor
taxonomy_0.module49.91 KBjanmast

Comments

morbus iff’s picture

Assigned: Unassigned » morbus iff

This is being caused by the patch over at http://drupal.org/node/19621 - where the return value of taxonomy_save_term has changed from a term object (where we grabbed the $tid of the new term) to $status, usually 0, which causes the error you're seeing (as a tid of 0 can't be inserted into term_node twice). Your fix is incorrect. I'm thinking about a proper one.

morbus iff’s picture

Closing this issue - all patches will be sent to the originating feature request (which actually breaks something else besides this particular report). More at http://drupal.org/node/19621 shortly.

morbus iff’s picture