Jump to:
| Project: | CCK Taxonomy Super Select Ultra |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I have a bilingual site under development which uses CCK Taxonomy fields in Views to permit the user to filter listings based on the chosen terms. Because the lists are massive, I have implemented SSU to give the user check boxes when creating their content, as multiple selections are simpler to understand.
The problems arise when I use SSU fields to set up the filters in Views, and there is little rhyme or reason to the situation. I have several vocabularies I use and the larger ones show empty select lists in the view filter setup. The smaller ones seem to work, however, the list of terms includes both languages. CCK taxonomy works properly, and it is still installed (I need single selections as well, and until you have the radio buttons working, I have to retain it.).
My work-around is a kludge. I have retained both the CCK Taxonomy and CCK Taxonomy SSU fields in the content type, and used CCK Field Permissions to conceal the CCK Taxonomy fields. I then dropped the CCK Taxonomy table and created a (MySQL) view into the SSU table for the CCK Taxonomy module:
CREATE VIEW content_field_cck_termname AS SELECT vid, delta, nid, content_field_ssu_termname_tid AS content_field_cck_termname_tid FROM content_field_ssu_termname;
so both modules are seeing the same data.
I use the CCK Taxonomy SSU module to make data entry more intuitive for the user, and the CCK Taxonomy module to provide filtering in views.
The problems are two-fold:
First, the issue of the empty lists seems to be related to the size of the vocabulary. Is does not depend on the number of levels, and I changed one of the offending vocabularies (about 30 terms) to single level (no hierarchy) and the problem persisted. The lists which display are all less than 20 terms, and hierarchies work.
Second, the language issue, means I cannot use the lists which do display, because there is no switching of language. I just get a long, multilingual list!
Comments
#1
The language issue was solved. The I18N system creates new terms for each language, rather than simply translating the terms. SSU picks up all the terms, regardless of language. I switched to Localizer in my test bed, and the translations work fine.
The empty filter list is a SSU problem! If a SSU field is defined for a content type, Drupal adds the field to the content_type table. As soon as the field is added to a second content type, a new content_field table is created for the field, and the field is removed from the content_type table.
When a SSU field is being added as a filter in a view, everything appears normal for a SSU field which has been added to a single content type. As soon as the field is added to a second content type, multiple copies of the field appear in the Add Filter drop down list, and the select box for the filter is empty. Looking at the field definition in the view_filter table tells the story. The filter is still looking for the field defined in the content_type table, not the content_field table.
Removing the second content type does not correct the problem. I have upgraded this to critical, as the module is unusable if this is not corrected. I have been searching to see how views assembles the list of fields for the filters, and have not been able to make any sense of it.