Greetings,
After upgrading to Drupal 5.2 (and having Category module installed) all the new topics that I post say "this topic has been moved" when I go to the forum. When I look in the table `forum`, the `tid` is always set to 0.
It seems that $node->taxonomy isn't getting picked up in the forum_submit function. In the following function, the if ($node->taxonomy) doesn't match.
function forum_submit(&$node) {
// Make sure all fields are set properly:
$node->icon = !empty($node->icon) ? $node->icon : '';
if ($node->taxonomy) {
// Get the forum terms from the (cached) tree
$tree = taxonomy_get_tree(_forum_get_vid());
If I manually set $node->tid = 41 above the if ($node->taxonomy) statement, the topic appears in the correct forum without "this topic has been moved" thing.
Seems like $node->taxonomy isn't getting picked up somewhere.. maybe it's outside of this module?
Any ideas?
Thanks,
Andrey.
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedSuggestion: Empty the cache_* tables.
Did you execute the upgrade.php?
Comment #2
mr.andrey CreditAttribution: mr.andrey commentedJust cleared the cache* tables:
upgrade.php? I executed update.php, is there upgrade.php that I need to run?
Still experiencing this problem.
Thanks,
Andrey.
Comment #3
mr.andrey CreditAttribution: mr.andrey commentedIt seems that $node->taxonomy is empty, but if I set it to equal $node->category, everything works.
This seems more like Category problem rather than Forum module, so I will move it there.
At which point does Category set the $node->taxonomy while inserting a new forum topic?
Is it this?
Any ideas?
Thanks,
Andrey.
Comment #4
JirkaRybka CreditAttribution: JirkaRybka commentedNot sure whether this is related or not, but look at this: http://drupal.org/node/117172
Using the patches from that Issue allowed me to use Forum with Category on production site, seems to be OK , active for weeks now.
Comment #5
mr.andrey CreditAttribution: mr.andrey commentedwohoo! it worked, the two patches did the trick:
http://drupal.org/files/issues/forum_compat.patch - this fixed the default forum problem
http://drupal.org/files/issues/validationtry2.patch - this fixed the $node->taxonomy tid=0 problem
Thanks!
Andrey.
Comment #6
dakku CreditAttribution: dakku commentedI am having the same issue, posts by registered members are not getting the correct tid in the forum table! Any ideas?