Hi,

Another painful hurdle...

I created two widgets selecting from a 2-level hierarchy vocabulary (country->city), selected different paths in them (forcing children, keeping all). It works nicely.

But whenever I submit such page the values merge into one, and also when I re-edit the page the values are not as I had set them.

I use Firefox 3 - can that be a problem?

Or is it because I use one vocabulary for both widgets?

Tomáš

Comments

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Active » Postponed (maintainer needs more info)

Are these Content Taxonomy widgets? How did you configure them exactly?

You really have to learn to give developers enough information ;) With what you gave me, I can't do much. (Not trying to be offensive, only asking that you try to see for yourself if you're giving enough information ;))

vacilando’s picture

Hi Wim, I understand :-) ... yet I am not sure how much more I could tell you on this problem.

By widget I of course mean your Hierarchical Select (HS).

I made location1 HS CCK field, and location2 HS CCK field, each of them is connected to a 2-dimensional vocabulary of countries and cities.

The CCK fields are set to save as both CCK value and as tags.

The vocabulary is has multiple hierarchy and multiple select switched on.

Selecting the two country->city location works fine, but when I save the node and edit it again, the CCK fields (= HS widgets) both contain the same country and the same city!

Has it perhaps got something to do with the fact that I am saving both as CCK values and as tags? Or is it because I use one vocabulary for both? Or is it Firefox 3? Or something else?
Does a setup like this work for you?

Thanks!

Tomáš

wim leers’s picture

The CCK fields are set to save as both CCK value and as tags.

This doesn't work correctly. You should set it to "save as tag". This also indicates you're using an old version, because the newest version overrides this automatically. I just released beta 1, so please upgrade ;)

Also, what you're doing is VERY "hacky": it's far from elegant. If you want to do this kind of non-standard functionality, you should learn how to code. I can't support EVERY use case ;)

vacilando’s picture

Version: 5.x-3.x-dev » 5.x-3.0-beta1
StatusFileSize
new15.93 KB
new14.93 KB
new16.78 KB
new109.53 KB

1) I have been using the newest version; in fact I got almost each CVS commit just after you were releasing it yesterday. Now, OK, I've just deleted the HS CCK fields, disabled HS module and its parts, deleted the module from the server, checked out the newest beta (with the fixed require call), uploaded it and enabled all HS modules except for the subscriptions one, and then I ran update.php (but there was nothing to do for HS).

I then went on to create the first HS CCK field. All right, so as before, I do see the red message 'important' and the link to go on to do the settings elsewhere -- but at the same time there are the usual CCK settings below it, including "Save in cck table" -- see the screenshot.
Is that the intended behaviour? If so, then I think you could consider making it clearer to the user that some of the the settings below are inactive and should not be touched while others (e.g. choice of the vocabulary!) must still be set.
If that is not the intended behaviour then please indicate what do I have to do to clear whatever haunting remnants of old code / tables.

2) Wim, with the 'hacky' statement it is you who are not precise enough :-) What is non-standard about using a hierarchical select widget for country->city or month->day selection? Can you elaborate? I would expect many people using it for that. Btw, I consider myself a rather good PHP coder but I still don't understand all the details of Drupal's system nor your module well enough to instantly be able to see how can I tweak them for new functionalities.

3) I have finished a test to show you the original problem I face - it is still there. See the three other attachments: hs_fresh.JPG (as I selected the data), hs_saved.JPG (just saved - see the mess!), and hs_edited_again.JPG (when I clicked 'edit' again).

Tomáš

wim leers’s picture

StatusFileSize
new21.73 KB

1) regarding the "save options" and "multiple values" settings: I don't have that. For me, they are disabled. See the attached screenshot. I'll try to find out if I'm doing a wrong or incomplete check somewhere.

2) Thanks to your screenshots, I can now see I misunderstood you, so the "hacky" statement does not apply :). Sorry. Country -> city makes sense. But month -> day does not, at least if you're using taxonomy for it, which I think you are doing. You should use a date field instead, which will also automatically support leap years, timezones, etc. You can then define a new CCK widget for it, if you want.
Actually, that's an excellent candidate for Hierarchical Select Support that I did not yet think of. I'll probably add support for it in beta 2 :)

3) I will try to reproduce your problem, now I understood you better.

vacilando’s picture

1) I can add that the selectors (multiple values and save options) indeed are disabled now - but they weren't just when I created the CCK field (and captured the above hs_save_in_cck.JPG). That might help you debugging it.

2) About month->day. Of course I had tried the date field first but that does not work if you need to allow B.C. dates (negative years, no Unix timestamps). In such case you need a more generic approach.

3) Thanks for looking into this.

wim leers’s picture

Title: Two widgets assume one value » "Save options" and "Multiple values" not managed by HS upon creation of new field
Component: Code » Code - Content Taxonomy
Category: support » bug
wim leers’s picture

Status: Postponed (maintainer needs more info) » Fixed
wim leers’s picture

The problem of multiple content_taxonomy fields that use the same vocabulary, remains. Let's continue that in this issue: http://drupal.org/node/277780.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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