Incorrect use of vid instead of nid in term_node table

The INSERT INTO term_node query assign $node->vid to the nid field of term_node table. It should assign $node->nid.

It works until a revision is created (when $nid and $vid are no more synchronised with each other).

Patch is supplied.

Have I got it right ?

CommentFileSizeAuthor
patch_0_0.txt488 bytesAnonymous (not verified)

Comments

Anonymous’s picture

It is apparently the same for the 5.x-1.x-dev version of the module.

bjaspan’s picture

Status: Needs review » Fixed

You appear to be correct. Primary Term assigns the PT to a vid but taxonomy.module (in D5) assigns terms to nids; this is probably what led to the confusion. Anyway, I fixed the module not to muck directly with the term_node table at all, using nodeapi('submit') instead, which also fixed this bug.

I am not maintaining the 4.7 branch of PT any more; if someone comes along that wants to back-port fixes, I'll add them to the CVS access list.

Anonymous’s picture

Status: Fixed » Closed (fixed)