Closed (won't fix)
Project:
Content Taxonomy
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2008 at 22:52 UTC
Updated:
1 Sep 2010 at 10:19 UTC
I have several fields in the node that are type "content_taxonomy", and when these fields are told to get their terms from a freetagging vocabulary, every field in this case shows the same terms--but none are from that vocabulary, but from other vocabularies--even if they were not freetagging themselves).
This is because one of the queries does not limit by vocabulary ID. Attached is a patch.
Index: content_taxonomy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/content_taxonomy/content_taxonomy.module,v
retrieving revision 1.2.2.16
diff -u -p -r1.2.2.16 content_taxonomy.module
--- content_taxonomy.module 18 May 2008 20:30:36 -0000 1.2.2.16
+++ content_taxonomy.module 25 Jul 2008 22:43:42 -0000
@@ -218,9 +218,10 @@ function content_taxonomy_field_formatte
*/
function content_taxonomy_terms_by_field($node, $vid, $parent = NULL, $depth) {
if (is_numeric($parent) && $depth == 1) {
- $result = db_query("SELECT n.tid FROM {term_hierarchy} h, {term_node} n WHERE
- n.nid = %d AND n.tid = h.tid AND h.parent = %d", $node->nid, $parent);
-
+ $result = db_query("SELECT n.tid FROM {term_hierarchy} h, {term_node} n, {term_data} td WHERE
+ n.nid = %d AND n.tid = h.tid AND h.parent = %d AND td.tid=n.tid AND td.vid=%d",
+ $node->nid, $parent, $vid);
+
while ($data = db_fetch_array($result)) {
$term = taxonomy_get_term($data["tid"]);
$additions[$term->tid] = $term;
| Comment | File | Size | Author |
|---|---|---|---|
| content_taxonomy_fretagging.patch | 1.11 KB | janusman |
Comments
Comment #1
Vuds commentedI applied that patch and it worked to solve the issue (mine's is little different of janusman, I'm not using freetaging, but I have 4 activeselect fields in one form and it was messing up all of them when showing the results). This should be applied to the core.
Comment #2
janusman commentedBump! Really need this. I can issue a newer patch if it helps...
Comment #3
magnus commentedCleanup of old issues. According to maintainer: "active development is only done for the 6.x branch! 5.x is not supported any more".
Open a new issue if problem still exist.