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
I've checked and this is still in 5.7, don't think it's a problem in 6.x however.
#2
confirmed, and patch attached.
Shadow copies are still buggy though, but thats a different issue.
#3
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
Committed to 5.x.
#5
Automatically closed -- issue fixed for two weeks with no activity.