Thumbnails in treeview [was: Conflict with jQuery Update]
xtfer - July 9, 2008 - 05:16
| Project: | Taxonomy Manager |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
I've updated jQuery to 1.2.6 using jQuery update, and my tree view has stopped working. I haven't yet been able to confirm if its the Taxonomy Manager module which is at fault, but note it in case someone else has a similar problem. Same problem with current release and dev release.

#1
I have the same problem. When I install jquery update module it is not possible to click on the plus signs left of the term name. Thus it is not possible to see the child terms of that term. After uninstalling jquery update (and copying back the old misc/jquery.js file and clearing the browser cache it all works again.
I installed jquery update version 5.x-2.0-rc1 and used Taxonmoy Manger version 5.x.1.x-dev
BTW, same problem can be observed in both in Firefox 2.0.4 and IE6
#2
exact same behaviour for me.
#3
I see the same behaviour. TM needs to be fixed.
#4
Does the tree work with the D6 version? As D6 also uses jquery 1.2.6, perhaps it is possible to backport the changes.
#5
Additional info: It seems to work up to jquery 1.1.4.
#6
To make it work with jquery after 1.1.4, one has to change the following function in tree.js from:
/*** adds collapsible treeview to a given list
*/
Drupal.attachTreeview = function(ul) {
$(ul)
.addClass("treeview")
.find("li[ul]").prepend("<div class='hitArea'/>").find("ul").hide().end()
.find("div.hitArea").click(function() {
Drupal.toggleTree(this);
});
}
to this:
/*** adds collapsible treeview to a given list
*/
Drupal.attachTreeview = function(ul) {
$(ul)
.addClass("treeview")
.find("li:has(ul)").prepend("<div class='hitArea'/>").find("ul").hide().end()
.find("div.hitArea").click(function() {
Drupal.toggleTree(this);
});
}
#7
if I change the code, does it still work with the original jquery version included in drupal-5.x?
#8
No, it won't work with jquery below 1.1.4.
#9
Same problem here. Just changing that piece of code and TM is working again!
P.S: I just needed to control + F5 my browser to get the "new" tree.js file available.
#10
Worked for me too. Thanks for finding that!
shawn
#11
Nice work, fix worked for me.
#12
Thank you! This solved my problem!
#13
#6 works fine on several sites, even had to use it to fix a site running jquery_update v 1.1.2.2 (2008/05/30), so not only for later JQuery versions... Should be committed.
#14
Confirmed this happens with TM 5.x-1.x-dev and JQU 5.x-2.0.
I've created a patch for TM 5.x-1.x-dev based on the code from #6 (run patch from 'taxonomy_manager' folder, not the 'js' folder, and use the -p0 option).
Let me know how it goes...
#15
BWPanda, the patch works well. Thanks!
#16
Thanks a lot for this patch!!
Please commit!
greetings,
Martijn
#17
If this patch is commited, a dependency on jquery update is needed as well.
#18
I don't want to make a dependency on the JQuery Update module now, although it's used on many drupal sites.
But I'm going to add a notice on the project page, because it seems like that many people are facing the problem.
#19
I'm running Drupal 5.11, PHP 5.2.6, jQuery 1.2.6 + update 2.x installed for Hierarchical Select.
Recently installed Taxonomy Manager. I applied the fix at #6.
Tree view works well in IE (can expand the tree),
but not in Firefox 3.0.7 or Safari 3.2.1. Can't expand the tree there.
Any ideas?
#20
Never mind: I cleared cache, closed and restarted Firefox and Safari : it works now in these 2 browsers.
#21
I have a related question. I'm using Taxonomy Image and I would like the treeview to display thumbnails of the terms' images instead of the term titles like it now does. How could I accomplish this? Thanks.