When I add a filter (equal to value) for the following field:
"field_display_status" which is a "Term reference" in the content type "Event" (a custom made content type)
the query does not display any result.
The Term could have the (german) values:
Aktuell
Vorschau
Rückschau
Standard
Configure filter Fields: field_display_status (field_display_status)
The filter settings causing no result ;-(
Node: Type = Event
Taxonomy: Term contains Ottobrunner
Fields: field_display_status = Aktuell
The Query:
SELECT node.nid AS nid, node.language AS node_language, field_data_field_tsr_headline.entity_id AS field_data_field_tsr_headline_entity_id, field_data_field_tsr_headline.etid AS field_data_field_tsr_headline_etid, field_data_field_cnt_image01.entity_id AS field_data_field_cnt_image01_entity_id, field_data_field_cnt_image01.etid AS field_data_field_cnt_image01_etid, field_data_field_tsr_copy.entity_id AS field_data_field_tsr_copy_entity_id, field_data_field_tsr_copy.etid AS field_data_field_tsr_copy_etid, field_data_field_display_status.entity_id AS field_data_field_display_status_entity_id, field_data_field_display_status.etid AS field_data_field_display_status_etid, node.vid AS node_vid, taxonomy_term_data.name AS taxonomy_term_data_name, taxonomy_term_data.vid AS taxonomy_term_data_vid, taxonomy_term_data.tid AS taxonomy_term_data_tid, taxonomy_vocabulary.machine_name AS taxonomy_vocabulary_machine_name, taxonomy_vocabulary.name AS taxonomy_vocabulary_name
FROM
{node} node
LEFT JOIN {taxonomy_index} taxonomy_index ON node.nid = taxonomy_index.nid
LEFT JOIN {taxonomy_term_data} taxonomy_term_data ON taxonomy_index.tid = taxonomy_term_data.tid
LEFT JOIN {field_data_field_display_status} field_data_field_display_status ON node.nid = field_data_field_display_status.entity_id AND field_data_field_display_status.etid = 2
LEFT JOIN {field_data_field_tsr_headline} field_data_field_tsr_headline ON node.nid = field_data_field_tsr_headline.entity_id AND field_data_field_tsr_headline.etid = 2
LEFT JOIN {field_data_field_cnt_image01} field_data_field_cnt_image01 ON node.nid = field_data_field_cnt_image01.entity_id AND field_data_field_cnt_image01.etid = 2
LEFT JOIN {field_data_field_tsr_copy} field_data_field_tsr_copy ON node.nid = field_data_field_tsr_copy.entity_id AND field_data_field_tsr_copy.etid = 2
LEFT JOIN {taxonomy_vocabulary} taxonomy_vocabulary ON taxonomy_term_data.vid = taxonomy_vocabulary.vid
WHERE (( (node.type IN (event)) AND (taxonomy_term_data.name LIKE %Ottobrunner% ESCAPE '\\') AND (field_data_field_display_status.field_display_status_tid = Aktuell) ))
When I change the last filter to "Fields: field_display_status >= Aktuell " I get results !!!
Here the query:
SELECT node.nid AS nid, node.language AS node_language, field_data_field_tsr_headline.entity_id AS field_data_field_tsr_headline_entity_id, field_data_field_tsr_headline.etid AS field_data_field_tsr_headline_etid, field_data_field_cnt_image01.entity_id AS field_data_field_cnt_image01_entity_id, field_data_field_cnt_image01.etid AS field_data_field_cnt_image01_etid, field_data_field_tsr_copy.entity_id AS field_data_field_tsr_copy_entity_id, field_data_field_tsr_copy.etid AS field_data_field_tsr_copy_etid, field_data_field_display_status.entity_id AS field_data_field_display_status_entity_id, field_data_field_display_status.etid AS field_data_field_display_status_etid, node.vid AS node_vid, taxonomy_term_data.name AS taxonomy_term_data_name, taxonomy_term_data.vid AS taxonomy_term_data_vid, taxonomy_term_data.tid AS taxonomy_term_data_tid, taxonomy_vocabulary.machine_name AS taxonomy_vocabulary_machine_name, taxonomy_vocabulary.name AS taxonomy_vocabulary_name
FROM
{node} node
LEFT JOIN {taxonomy_index} taxonomy_index ON node.nid = taxonomy_index.nid
LEFT JOIN {taxonomy_term_data} taxonomy_term_data ON taxonomy_index.tid = taxonomy_term_data.tid
LEFT JOIN {field_data_field_display_status} field_data_field_display_status ON node.nid = field_data_field_display_status.entity_id AND field_data_field_display_status.etid = 2
LEFT JOIN {field_data_field_tsr_headline} field_data_field_tsr_headline ON node.nid = field_data_field_tsr_headline.entity_id AND field_data_field_tsr_headline.etid = 2
LEFT JOIN {field_data_field_cnt_image01} field_data_field_cnt_image01 ON node.nid = field_data_field_cnt_image01.entity_id AND field_data_field_cnt_image01.etid = 2
LEFT JOIN {field_data_field_tsr_copy} field_data_field_tsr_copy ON node.nid = field_data_field_tsr_copy.entity_id AND field_data_field_tsr_copy.etid = 2
LEFT JOIN {taxonomy_vocabulary} taxonomy_vocabulary ON taxonomy_term_data.vid = taxonomy_vocabulary.vid
WHERE (( (node.type IN (event)) AND (taxonomy_term_data.name LIKE %Ottobrunner% ESCAPE '\\') AND (field_data_field_display_status.field_display_status_tid >= Aktuell) ))
and a example of the output-data which shows that exists fields with "field_display_status = Aktuell".
So what is wrong ? Me or the module ?
The output fields are:
Node: Nid (hidden)
Fields: field_tsr_headline
Fields: field_cnt_image01
Fields: field_tsr_copy
Node: Link
Fields: field_display_status field_display_status
Taxonomy: All terms All terms
Taxonomy: Term Term
Taxonomy: Term ID Term ID
Taxonomy: Vocabulary machine name Vocabulary machine name
Taxonomy: Vocabulary name Vocabulary name
The preview output:
Aktuelles Event: Klaus Doldinger - die Passport Legende
Teasertext für das Event. Erste Zeile ggf. FETT.Dann als Absatz 2-3 weitere Zeilen und Text mit kurzem beschreibenden Inhalt zum Event. Zeilenumbrüche passieren hier automatisch. Die beiden Musiker-Brüder Cornelius Claudio Kreusch und Johannes Tonio Kreusch haben sich längst weltweit den Ruf erspielt, absolute Meister ihres Faches zu sein.
Details
field_display_status:
Aktuell
Term: Ottobrunner-Konzerte
Term ID: 14
Vocabulary machine name: event_category
Vocabulary name: Event-Kategorie
Comments
Comment #1
dawehnerIt's a tid not a string. So you have to use the integer of the taxonomy term "Aktuell".
Comment #2
drupa11y commentedAnd how can I find out this value of the term?
Or should I use another filter instead?
Comment #3
drupa11y commentedGot it from the "edit node"-source code of the form ;-)
It would be cool to could use the "values" labels somehow or what filter is then better to use for this use case?
Comment #4
drupa11y commentedchanged the topic & categories.
Comment #5
dawehnerThis is a task which has to be done. You can find out the tid in the taxonomy term on the listing
Comment #6
TrevorG commentedRealize this is non-priority but this stumped me equally for about 6 hours today, would have thought taxonomy filters were broken until I realized that I needed to go through the field tid, and that it was an integer. Would be much much easier to have a similar select options as Taxonomy.
Comment #7
merlinofchaos commentedChecked in a fix to change this filter to the smarter taxonomy filter. Should go out in tomorrow's -dev.