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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jenlampton’s picture

Version: 4.7.x-1.0 » 5.x-1.5-1
Assigned: Unassigned » jenlampton
Status: Active » Needs review
FileSize
955 bytes

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

kinnel’s picture

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!

Dimm’s picture

Thanks!

ali27’s picture

Assigned: 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);
      }
NancyDru’s picture

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.

doc2@drupalfr.org’s picture

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.

NancyDru’s picture

works for me

doc2@drupalfr.org’s picture

Version: 5.x-1.10 » 5.x-1.11
FileSize
19.23 KB

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.

Ocyrhoé’s picture

works for me on 6.x

chaloalvarezj’s picture

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

marpic’s picture

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... :-) ).

doc2@drupalfr.org’s picture

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

a_c_m’s picture

Status: Postponed (maintainer needs more info) » Active

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

a_c_m’s picture

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.

jcisio’s picture

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.

jcisio’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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