Hi,
How would we go about merging forums from an old Drupal install into our Drupal 6 install? Both already have nodes (the forums install for forum posts, the other for stories, pages, etc.). Is it a simple matter of the following?:
1) increment the nids (and vids) in the node and term_nodes tables of the forums install by the highest nid (or vid) in the main install
2) create a new vocabulary in the main install with the same terms as the Forums vocab in the forums install (at maininstall.com/admin/content/forum - I'm not sure how else to specify this is the forum vocabulary)
3) change the tids in the term_nodes tables of the forums install to the tid values of terms in this new vocabulary in the main install
4) insert the contents of the modified node and term_nodes tables of the forums install into the node and term_nodes tables of the main install.
Would this work? Do you have to take data from any other tables to get the forum nodes into the new install? (Both installs have identical UIDs so that's one headache gone.)
Comments
Missing table?
OK, I tried what I suggested above and have all the new entries in node and node_revisions, with old nids incremented by the highest nids that were in these tables already. So, for instance, I have an entry in both node and node_revisions with nid 98113. But when I go to /node/98113 I get a 404. Is there some other table I should be copying data over from?
What's strange is that when I manually create an entry with a fresh nid (like 98114) and vid in node and node_revisions, it shows up fine at /node/98114
_
I'd usually do this by setting up a view to export the posts from the source site into a csv file then use the node_import module to import them into the new site.
How do you do that? Do you
How do you do that? Do you use the View Bulk Operations and Node Export modules ( http://drupal.org/project/views_bulk_operations and http://drupal.org/project/node_export )? I'd still need to do steps 1 to 3 above to avoid importing nids, vids and tids which have already been used wouldn't I? Last time I looked at it Node Import didn't appear to change the nids it was importing if they were already present.
I take it you've done some such merge though? Did it create any problems? I'm worried that Drupal won't know all these new nids have been created, and may overwrite them when it reaches their number in the course of creating new nodes. Is there an internal tracker for where new nids and vids start that I should be changing?
_
The whole point of doing it with node_import or feedapi is exactly so all the relevant values get set properly and drupal does know about the imports correctly. If you do it manually, you run the risk of not catching all the places that have to be updated.