Download & Extend

Parent term tagging breaks with TSS and multiple select

Project:Taxonomy Super Select (TSS)
Version:6.x-1.1
Component:Code
Category:bug report
Priority:critical
Assigned:ali27
Status:closed (fixed)

Issue Summary

I am using Drupal 4.7.6 with TSS. When I have a vocabulary that needs multiple select with TSS and the ability to display parent terms as options, TSS breaks this. If I go to tag a parent term or any other term with multiple select, it puts it with one of the child terms randomly. The only way to get it working with parent terms is to turn off multiple select with all my taxonomies that are using TSS.

Comments

#1

Version:4.7.x-1.0» 5.x-1.5-1
Assigned to:Anonymous» jenlampton
Status:active» needs review

The problem with parent items is that the value of the parents wasn't being set correctly in the name of the form item, so even though a user can select the category they like, it doesn't get saved correctly.

if($term->is_parent){
        $term->weight = -11;
        $form['parent'] = _tss_branch($term->vid, $term, $term->parent_value, $term->parent_type);
      }

should be changed to

if($term->is_parent){
        $term->weight = -11;
        $form[$term->tid] = _tss_branch($term->vid, $term, $term->parent_value, $term->parent_type);
      }

patch attached.
-Jen

AttachmentSize
taxonomy_super_select.module_0.patch 955 bytes

#2

This seems to fix the problems I've been having where the top-level term would not get saved.

Also, the top-level term would not display in the views filter.

Thanks!

#3

Thanks!

#4

Assigned to:jenlampton» ali27

i found that it is better if you change it to :

    if($term->is_parent){
        $term->weight = -11;
        $form['parent'.$term->tid] = _tss_branch($term->vid, $term, $term->parent_value, $term->parent_type);
      }

#5

Status:needs review» postponed (maintainer needs more info)

Can you please try 5.x-1.10 and see if this problem still exists? I suspect it is now fixed. If it is, please mark this issue as fixed. Thanks.

#6

Version:5.x-1.5-1» 5.x-1.10

Same bug fixed for version 1.5-1 by Ali in #4 reappeared in 1.10.

#7

works for me

#8

Version:5.x-1.10» 5.x-1.11

Still in 5.1-11.
Attached is the export XML file (thanks to the Taxonomy Import/Export module) of one of the conflicting vocabularies. It's called "Lieux", for "Location".

When I tag the parent Term "Aix-en-Provence", I have EACH time "Vaison-la-Romaine" tagged INSTEAD (same level in vocab).

In the Musique vocab, Prokoviev is always tagged instead of Bach. Just as a remark, none of the terms are the First or Last of the list.

AttachmentSize
taxonomy_lieux.xml_.txt 19.23 KB

#9

works for me on 6.x

#10

BUG confirmed: Parent term is not saved, other term gets saved instead.

Have applied the patch to the latest version for drupal 6 and works perfectly so far. Please maintainer commit this patch as this bug is critical: It practically renders the module unusable.

Cheers

#11

This bug is still present for version 6.x-1.0. The attached patch fix the bux.

I also believe this is a critical bug (ok, this was just a +1 comment... :-) ).

#12

Did you forget the patch? I can't find it... is it easily portable to d5 versions? Thanks in advance. Regards, Arsène

#13

Status:postponed (maintainer needs more info)» active

Still seems to be a bug in 6.x-1.0

#14

Patch fixes the issue, i had to apply it myself (as i have other patches applied).

For me it was around line 194, in the _tss_branch() function.

#15

Version:5.x-1.11» 6.x-1.1

Fixed in 6.x in #369656: TTS doesn't save parent terms?. Sorry, but you need to apply #4 for 5.x branch. I can't test, however.

#16

Status:active» fixed

#17

Status:fixed» closed (fixed)

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

nobody click here