0

I am using drupal 8 and have a date field with the values limited to two.

This works well until I have to put it into a view. When I do so, I get two view rows, one sorted by the value of the first value and another sorted by the second value.

I have tried to use aggregation and Count Distinct, but I get a huge error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'taxonomy_term_field_data_node__field_NAME_2__taxonomy_term__FIELD_NAME_1.FIELD_NAME_1_' in 'field list': SELECT COUNT(*) AS expression FROM (SELECT taxonomy_term_field_data_node__field_NAME_2__taxonomy_term__FIELD_NAME_1.FIELD_NAME_1_ AS taxonomy_term_field_data_node__field_NAME_2__taxonomy_te, node_field_data.title AS node_field_data_title, node__field_address.field_address_value AS node__field_address_field_address_value, node__field_NAME_3.field_NAME_3_value AS node__field_NAME_3_field_NAME_3_value, node_field_data.created AS node_field_data_created, 1 AS expression FROM {node_field_data} node_field_data LEFT JOIN {node__field_NAME_2} node__field_NAME_2 ON node_field_data.nid = node__field_NAME_2.entity_id AND (node__field_NAME_2.deleted = :views_join_condition_0 AND node__field_NAME_2.langcode = node_field_data.langcode) LEFT JOIN {taxonomy_term_field_data} taxonomy_term_field_data_node__field_NAME_2 ON node__field_NAME_2.field_NAME_2_target_id = taxonomy_term_field_data_node__field_NAME_2.tid LEFT JOIN {taxonomy_term__FIELD_NAME_1} taxonomy_term_field_data_node__field_NAME_2__taxonomy_term__FIELD_NAME_1 ON taxonomy_term_field_data_node__field_NAME_2.tid = taxonomy_term_field_data_node__field_NAME_2__taxonomy_term__FIELD_NAME_1.entity_id AND (taxonomy_term_field_data_node__field_NAME_2__taxonomy_term__FIELD_NAME_1.deleted = :views_join_condition_2 AND taxonomy_term_field_data_node__field_NAME_2__taxonomy_term__FIELD_NAME_1.langcode = taxonomy_term_field_data_node__field_NAME_2.langcode) LEFT JOIN {node__field_address} node__field_address ON node_field_data.nid = node__field_address.entity_id AND (node__field_address.deleted = :views_join_condition_4 AND node__field_address.langcode = node_field_data.langcode) LEFT JOIN {node__field_NAME_3} node__field_NAME_3 ON node_field_data.nid = node__field_NAME_3.entity_id AND (node__field_NAME_3.deleted = :views_join_condition_6 AND node__field_NAME_3.langcode = node_field_data.langcode) WHERE (( (node_field_data.status = :db_condition_placeholder_0) AND (node_field_data.type IN (:db_condition_placeholder_1)) )) GROUP BY taxonomy_term_field_data_node__field_NAME_2__taxonomy_te, node_field_data_title, node_field_data.nid, node__field_address_field_address_value, node__field_NAME_3_field_NAME_3_value, node_field_data_created) subquery; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => recent [:views_join_condition_0] => 0 [:views_join_condition_2] => 0 [:views_join_condition_4] => 0 [:views_join_condition_6] => 0 )

How can I have two date values with only one view result?

Thanks in advance!

  • What the error you are getting can you post? – CodeNext Oct 11 '16 at 3:56
  • @CodeNext Error posted. – Chris Happy Oct 14 '16 at 4:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.