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

pkej - July 15, 2008 - 10:42

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

peterzoe - July 23, 2008 - 10:26

exact same behaviour for me.

#3

nath - July 24, 2008 - 09:41
Status:postponed (maintainer needs more info)» active

I see the same behaviour. TM needs to be fixed.

#4

nath - July 24, 2008 - 09:47

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

nath - July 24, 2008 - 12:15

Additional info: It seems to work up to jquery 1.1.4.

#6

nath - July 24, 2008 - 15:06

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

mh86 - July 24, 2008 - 15:18

if I change the code, does it still work with the original jquery version included in drupal-5.x?

#8

nath - July 24, 2008 - 15:22

No, it won't work with jquery below 1.1.4.

#9

ferrangil - August 11, 2008 - 12:44

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

sdsheridan - August 18, 2008 - 13:29

Worked for me too. Thanks for finding that!

shawn

#11

emackn - August 18, 2008 - 17:46

Nice work, fix worked for me.

#12

chaloalvarezj - August 22, 2008 - 06:52

Thank you! This solved my problem!

#13

Taxoman - September 16, 2008 - 19:09
Priority:minor» normal

#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

BWPanda - September 25, 2008 - 01:36
Title:Possible conflict with jQuery Update» Conflict with jQuery Update
Status:active» needs review

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...

AttachmentSize
taxonomy_manager-280202-14.patch 472 bytes

#15

mkrakowiak - September 26, 2008 - 02:28

BWPanda, the patch works well. Thanks!

#16

Summit - September 26, 2008 - 08:20

Thanks a lot for this patch!!
Please commit!

greetings,
Martijn

#17

nath - September 29, 2008 - 13:28

If this patch is commited, a dependency on jquery update is needed as well.

#18

mh86 - October 7, 2008 - 13:10

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

jpdaut - March 22, 2009 - 17:59

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

jpdaut - March 22, 2009 - 18:23

Never mind: I cleared cache, closed and restarted Firefox and Safari : it works now in these 2 browsers.

#21

jpdaut - March 22, 2009 - 18:31
Title:Conflict with jQuery Update» Thumbnails in treeview [was: Conflict with jQuery Update]

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.

 
 

Drupal is a registered trademark of Dries Buytaert.