Download & Extend

bug in call to taxonomy_node_get_terms_by_vocabulary

Project:Drupal core
Version:5.x-dev
Component:forum.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

In the function forum_form there is a call to the taxonomy_node_get_terms_by_vocabulary function. This function expects the function parameters of $nid and $vid. The function call in forum function forum_form reverses the function parameters.

Is: $forum_terms = taxonomy_node_get_terms_by_vocabulary(_forum_get_vid(), $node->nid);

should be: $forum_terms = taxonomy_node_get_terms_by_vocabulary($node->nid, _forum_get_vid());

This is at line 395

Comments

#1

Version:5.2» 5.x-dev

I've checked and this is still in 5.7, don't think it's a problem in 6.x however.

#2

Status:active» needs review

confirmed, and patch attached.

Shadow copies are still buggy though, but thats a different issue.

AttachmentSizeStatusTest resultOperations
20080225.forum-terms-by-voc.patch1.06 KBIgnored: Check issue status.NoneNone

#3

Status:needs review» reviewed & tested by the community

I've tested this--on the 5.x-dev branch--by creating two forums, creating a new topic, then editing it and moving the topic to the other forum with the 'Leave shadow copy' box checked. When editing the moved topic, after moving it of course, the 'Leave shadow copy' is correctly checked.

This is a tiny fix and probably won't effect anything, but why leave the code wrong? This is ready to be committed, if there's another release of the 5 series it would be good to have this in there. :)

#4

Status:reviewed & tested by the community» fixed

Committed to 5.x.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

nobody click here