bug in call to taxonomy_node_get_terms_by_vocabulary

jaydub - September 17, 2007 - 09:05
Project:Drupal
Version:5.x-dev
Component:forum.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

#1

Liam McDermott - February 11, 2008 - 13:25
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

Bart Jansens - February 25, 2008 - 11:04
Status:active» patch (code needs review)

confirmed, and patch attached.

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

AttachmentSize
20080225.forum-terms-by-voc.patch1.06 KB

#3

Liam McDermott - February 27, 2008 - 22:50
Status:patch (code needs review)» patch (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

drumm - April 5, 2008 - 02:19
Status:patch (reviewed & tested by the community)» fixed

Committed to 5.x.

#5

Anonymous (not verified) - April 19, 2008 - 02:23
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.