I don't know if this is a bug or something I'm doing wrong, but I created a view to show taxonomy terms. In the generated query, NO_LANGUAGE isn't being replaced with 'und'.
The view has this filter: "Taxonomy term: Language". On the settings for that filter, I checked "Current user's language" and "No language". This is the resulting query (the arguments were replaced with their values by the devel module):
SELECT taxonomy_term_data.name AS taxonomy_term_data_name, taxonomy_term_data.vid AS taxonomy_term_data_vid, taxonomy_term_data.tid AS tid, taxonomy_vocabulary.machine_name AS taxonomy_vocabulary_machine_name, taxonomy_term_data.description AS taxonomy_term_data_description, taxonomy_term_data.format AS taxonomy_term_data_format, taxonomy_term_data.weight AS taxonomy_term_data_weight, 'taxonomy_term' AS field_data_field_owning_company_taxonomy_term_entity_type, 'taxonomy_term' AS field_data_field_which_column_taxonomy_term_entity_type FROM taxonomy_term_data taxonomy_term_data LEFT JOIN taxonomy_vocabulary taxonomy_vocabulary ON taxonomy_term_data.vid = taxonomy_vocabulary.vid WHERE (( (taxonomy_vocabulary.machine_name IN ('manufacturer')) AND (taxonomy_term_data.language IN ('en', '***NO_LANGUAGE***')) )) ORDER BY taxonomy_term_data_weight ASC
When I replace "***NO_LANGUAGE***" with "und", it works as expected.
I tried this with 7.x-3.3 and with 7.x-3.x-dev of 2012-Jul-22; both have the same problem.
Is this a bug, or something I'm doing wrong?
Comment | File | Size | Author |
---|---|---|---|
#2 | 1698460-term-language.patch | 774 bytes | dawehner |
Comments
Comment #1
TolstoyDotCom CreditAttribution: TolstoyDotCom commentedI "fixed" this using hook_query_alter(), which looks at the
DatabaseCondition
objects insideDatabaseCondition
objects for '***NO_LANGUAGE***' and changes it to 'und'. But, hopefully there's a better way.Comment #2
dawehnerWell that's actually something which is done by views itself, mh.
This is a bug of i18nviews:
Here is some code of views:
and here the code of i18nviews:
Comment #3
webflo CreditAttribution: webflo commentedFixed. Commit 26bd52c on 7.x-3.x. Thanks!