Hi
we had 2 sites with TSS active on. We have just noticed the following (bear with me, it's hard to describe!) -
we have:
category1
--sub-category1
-- -- sub-sub-category1
category2
--sub-category2
-- -- sub-sub-category2

What we are finding is that if someone selects something from any category and then submits, they are actually getting ONE category - the same one every time. For example, we are using town names - they may select Algarve, but they always get Tamega. Whatever the select they get Tamega.

This is happening on both sites (one for Spain and one for Portugal) - when I disable TSS the selection happens correctly (ie they select Algarve, they get Algarve)

What am I doing wrong? Where do I look next?
thanks in advance
Debs

Comments

codexmas’s picture

What other modules do you have installed in both sites that are common?

I take it that this was not a problem before and that this has only started happening recently?

If so, around when did you notice it and had any changes to the site been made?

Another option to try is to install a clean drupal and only TSS then recreate a portion of your vocabularies and test there, see if it is still happening. Try and isolate what the problem is, if it works fine, start installing all the modules that you have on the problem site and check for the issue after each change.

Thanks,
Gord.

andyschm’s picture

This happens on my site as well;

If I view-source on the page I can see that the checkboxes have the wrong name= attribute in the input tag. For example I see name="taxonomy[2567]" where it should be name="taxonomy[2567][]" for a multiple select vocabulary. With the [] missing on the end PHP automatically discards the array data and only keeps the last entry, thus the symptom "the same is one is selected every time".

I'm not sure exactly what the correct fix is here. Single select taxonomies should be unaffected. According to the drupal forms api, the the "checkbox" type doesn't support multiple input -- the "checkboxes" type does.

There are two possible fixes, I think. The simple one is to patch the drupal core checkbox type to accept the multiple flag. Not sure how well this would go over. The second is to patch the drupal core "checkboxes" type so that its tree-view mode supports the features you want for TSS and then just let forms-api handle the widget (this would also solve the other problem of the fixed depth-5 rendering since I presume their implementation of the checkboxes tree already handles arbitrary depth).

guardian’s picture

i'm also facing wrong taxonomy term assignment
i don't have a proper test case to submit yet though :(

FreeFox’s picture

+1

I tested and in the source code I saw:

Without TSS (which give me the right result)

Content-Disposition: form-data; name="taxonomy[1][]"
1
Content-Disposition: form-data; name="taxonomy[1][]"
4

With TSS (This results in a wrong value for the first line)

Content-Disposition: form-data; name="taxonomy[1][parent]"
1
Content-Disposition: form-data; name="taxonomy[1][4]"
4

So I presume that the error lies in the [parent] part. I hope for a quick response because I have to demonstrate a test site in 2 weeks and it would be very nice to have TSS on board.

Thanks in advance
Jan

andyschm’s picture

Since this bug didn't appear to be easily fixed I switched to the Form Tweaker module which implements the same function as Taxonomy Super Select and IMHO a somewhat better UI. If you are under time pressure I recommend trying FT as an alternative.

FreeFox’s picture

Thanks a lot andyschm. I've downloaded it and will test it tomorrow. I really hope this works because I need this functionality next week. Glad someone read this topic in time.

Thanks again
Jan

jenlampton’s picture

I think my patch might fix this problem, check out
http://drupal.org/node/152708

Jen

nancydru’s picture

Status: Active » Closed (duplicate)