My settings is as follows:

I build a node type. One element is imagefield. Then I added the hierarchical taxonomy select (it's awesome). It works fine. As soon as I though upload an image the taxonomy select won't work. It looks like it would break the javascript as soon as I upload an image.

Comments

sdecabooter’s picture

I have the same problem.
Before doing an image upload, the HS works perfectly.

After uploading an image, you can still select a value from the first dropdown, but the 2nd dropdown with the children terms is no longer loaded.

In Firefox error console i get the following warnings:

Warning: reference to undefined property s.dataFilter
Source File: http://devlinux02/~svc/timd/misc/jquery.js?9
Line: 13

and multiple times

Warning: reference to undefined property D.cache[a][d]
Source File: http://devlinux02/~svc/timd/misc/jquery.js?9
Line: 13

No idea what that's about though... I'll see if i can debug this problem...

Kripsy’s picture

I can confirm this bug as well. I am guessing the ajax call from the file upload is messing with HS's js.

rapsli’s picture

is anybody working on this?

Flying Drupalist’s picture

subscribe

wim leers’s picture

Assigned: Unassigned » wim leers

rapsli will be sponsoring this patch. Thanks rapsli!

I'll work on this on Monday.

Tschachim1’s picture

subscribing...

FWE’s picture

subscribing...

wim leers’s picture

Title: File upload break hierarchical select » Imagefield breaks HS
Status: Active » Fixed
StatusFileSize
new1.08 KB

This was actually due to a bug in filefield! I've posted a patch in their issue queue: http://drupal.org/node/372401.

I've also managed to make Hierarchical Select more resistant against these kinds of bugs. Almost all of the "compatibility bugs" are actually caused by modules other than HS, so this will probably prevent future problems.

Because I initially thought that the problem was being caused by the fact that HS wasn't using Drupal.behaviors yet, I also implemented that.

Thanks to rapsli for sponsoring this patch!

wim leers’s picture

Woops, I attached the Filefield patch instead of the HS patch. Here's the right one. It's already been committed too, of course.

FWE’s picture

Fantastic - Works like a charm!

A sincere thank you for an awesome project and your generosity for providing a solution so quickly - greatly appreciated!

Kripsy’s picture

I ran into a problem with this patch. I have a required hierarchical taxonomy in a default collapsed field. If the taxonomy is not set and a user tries to save the node, it gives the taxonomy not selected error, but then the hierarchical select's javascript is disabled. This was not an issue with HS before this patch.

wim leers’s picture

Status: Fixed » Needs work

Good catch Kripsy! I've already managed to reproduce it. I'll fix it later today – I've got to leave for school now.

wim leers’s picture

Status: Needs work » Fixed

Ok, an update.

My patch in #8, or at least a variation of it, got committed to ImageField.

My changes to hierarchical_select.module, as described here:

I've also managed to make Hierarchical Select more resistant against these kinds of bugs. Almost all of the "compatibility bugs" are actually caused by modules other than HS, so this will probably prevent future problems.

actually caused the problem reported by Kripsy. I failed to solve this due to lack of time and so it was reported again yesterday: http://drupal.org/node/408348. gunzip also pretty much posted a patch, so he's credited.

I removed this change that "made HS more resistant against these kinds of bugs". And all is good now, because ImageField itself was fixed.

Commit: http://drupal.org/cvs?commit=186202.

Status: Fixed » Closed (fixed)

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