I am working on reorganizing the forum layout on our site and in doing some I need to merge several forums and move some around. My problem is when I did this to our smallest forum (16 posts--its a low traffic forum obviously so a perfect test bed) I moved all the posts into 1 forum, renamed it what it needed to be renamed, moved it to its new Container and then deleted the old (now empty) forums. My problem is when I did this, ALL the posts that were originally from these old forums were deleted at the same time, despite having been moved to a new location (moved w/o creating shadow copy, but with new revision since minor changes were made to the posts as well).

Anyone have a solution to this? Searching turned up a bunch of off topic (for this problem) threads from what I saw.

Thanks!
-Karl

Comments

ryanscottdavis’s picture

You might want to take a look at your Drupal database. Look at your 'forum' table, do the nid and vid match-up?

ktiedt’s picture

Drupal falls flat on its face in this area?

-Karl

ktiedt’s picture

/**
 * Implementation of hook_update().
 */
function forum_update($node) {
  if ($node->revision) {
    db_query("INSERT INTO {forum} (nid, vid, tid) VALUES (%d, %d, %d)", $node->nid, $node->vid, $node->tid);
  }
  else {
    db_query('UPDATE {forum} SET tid = %d WHERE vid = %d', $node->tid, $node->vid);
  }
  db_query('UPDATE {term_node} SET tid = %d WHERE nid = %d', $node->tid, $node->nid);
}

-Karl

sepeck’s picture

Please file a report against 5. If you are really adventersome test Drupal 6 to see if it has a similar issue.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

ktiedt’s picture

http://drupal.org/node/159400

I'll be testing 6 I hope, but at the moment, I have no free time to do so.

-Karl