Needs review
Project:
Node Convert
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Dec 2011 at 23:44 UTC
Updated:
27 Sep 2012 at 20:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
sappling commentedAfter further investigation I think the problem is that the converted nodes still have the old TID referring to the original forum topic. Deleting the rows from the term_node table that linked the converted nodes to the old taxonomy corrected the problem, but it seems like node convert should have handled this.
Comment #2
kevin.dutra commentedYou're bang on with the investigation. There are other problems that arise from this too. Aside from the empty results pages you mentioned, you'll also find that the forum node next/previous links will still include the converted node (even though it's no longer a forum topic). And there may be other issues out there that aren't even specific to the forum type.
I'm attaching a patch to stop this from occurring. It removes any taxonomy terms from the node that are from vocabularies that the destination type does not have available. It also removes the line from
forum_node_convert_change()that deletes all the taxonomy terms from the node. As it is right now, it doesn't even do anything because the node load/save at the end ofnode_convert_node_convert()pulls and then saves cached taxonomy terms. (And the rest of this patch will remove the forum term anyways.)The one issue this patch does not address is what to do about data from the nodes that have already been converted. I can remove the term data for all nodes if the terms belong to vocabularies that aren't included in that type, but that would potentially delete a lot more data than intended because it doesn't look like Drupal core removes the term/node association when you remove a content type from a vocabulary.
Comment #3
kevin.dutra commentedWhoops, goofed that up a bit. Here's the correct one.