Download & Extend

connect nodes with taxonomy terms fails due to lack of $node->vid

Project:WP2Drupal (obsolete)
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I've been trying to get wp2drupal working on my D6.12 + WP2.62 install and although tags were being ported across as Drupal terms, the "connect nodes with taxonomy terms" section wasn't doing its job. It turned out to be that this query

db_query($query, $map_postid_nodeid[$binding['object_id']], $map_postid_nodeid[$binding['object_id']], $map_catid_termid[$binding['term_taxonomy_id']]);

...requires vid not nid in the second field. To get vid I created another mapping array higher up in the code:

$map_postid_vid[$post['ID']] = $node->vid;

and then changed the query to this:

db_query($query, $map_postid_nodeid[$binding['object_id']], $map_postid_vid[$binding['object_id']], $map_catid_termid[$binding['term_taxonomy_id']]);t to be that

...and now it works!

Comments

#1

Thanks, for catching that, I'll see how it works.

#2

This worked great for me - thanks bdwelle.

Patch attached for easy testing/integration of the fix.

AttachmentSize
wp2drupal_taxonomy.patch 1.61 KB

#3

Status:needs review» reviewed & tested by the community

#4

Status:reviewed & tested by the community» fixed

Thanks for your work, I've committed this fix.

#5

Status:fixed» closed (fixed)

I've just added this to a new release - v6.x-1.7.