Parent term tagging breaks with TSS and multiple select

emilyf - June 18, 2007 - 15:25
Project:Taxonomy Super Select
Version:5.x-1.11
Component:Code
Category:bug report
Priority:critical
Assigned:ali27
Status:postponed (maintainer needs more info)
Description

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.

#1

jenlampton - October 27, 2007 - 01:45
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

kinnel - October 27, 2007 - 19:40

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

Dimm - February 26, 2008 - 14:58

Thanks!

#4

ali27 - June 17, 2008 - 13:30
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

NancyDru - September 30, 2008 - 13:19
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

doc2@drupalfr.org - October 6, 2008 - 08:15
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

NancyDru - October 6, 2008 - 14:38

works for me

#8

doc2@drupalfr.org - October 8, 2008 - 12:45
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

Ocyrhoé - March 11, 2009 - 12:08

works for me on 6.x

#10

chaloalvarezj - May 22, 2009 - 00:41

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

martino.piccinato - July 1, 2009 - 09:21

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

doc2@drupalfr.org - July 10, 2009 - 00:25

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

 
 

Drupal is a registered trademark of Dries Buytaert.