After adding a sort by taxonomy term I receive the following error and have to delete the view and start over without a sort on taxonomy term to get it to work.

The page at http://localhost says:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /parenting/admin/structure/views/ajax/preview/resources?render=overlay
StatusText: Service unavailable (with message)
ResponseText: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'parenting.term_node' doesn't exist: SELECT term_data.name AS term_data_name, node.nid AS nid
FROM
{node} node
LEFT OUTER JOIN {term_node} term_node ON node.vid = term_node.vid
LEFT OUTER JOIN {term_data} term_data ON term_node.tid = term_data.tid
WHERE (( (node.type IN (:db_condition_placeholder_0)) ))
ORDER BY term_data_name ASC; Array
(
[:db_condition_placeholder_0] => resource
)
in views_plugin_pager->execute_count_query() (line 134 of /Applications/MAMP/htdocs/parenting/sites/all/modules/views/plugins/views_plugin_pager.inc).

Comments

dawehner’s picture

Status: Active » Fixed

You will find the taxonomy fields under the "Fields" category. From there you can use the sorting.

Thats sadly not fine yet. There is still the taxonomy term definition in hook_views_data even its all done via fieldapi.

We should remove this kind of definition.

Status: Fixed » Closed (fixed)

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

crimsondryad’s picture

I'm having this issue too, except I'm trying to set up filters.

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'projhorse.term_node' doesn't exist: SELECT COUNT(*) AS expression FROM (SELECT field_data_body.entity_id AS field_data_body_entity_id, field_data_body.etid AS field_data_body_etid, field_data_field_category.entity_id AS field_data_field_category_entity_id, field_data_field_category.etid AS field_data_field_category_etid, field_data_field_external_url.entity_id AS field_data_field_external_url_entity_id, field_data_field_external_url.etid AS field_data_field_external_url_etid, node.nid AS nid, node.title AS node_title, node.type AS node_type FROM {node} node INNER JOIN {term_node} term_node ON node.vid = term_node.vid LEFT JOIN {field_data_body} field_data_body ON node.nid = field_data_body.entity_id AND field_data_body.etid = :views_join_condition_0 LEFT JOIN {field_data_field_category} field_data_field_category ON node.nid = field_data_field_category.entity_id AND field_data_field_category.etid = :views_join_condition_1 LEFT JOIN {field_data_field_external_url} field_data_field_external_url ON node.nid = field_data_field_external_url.entity_id AND field_data_field_external_url.etid = :views_join_condition_2 WHERE (( (term_node.tid IN (:db_condition_placeholder_0)) ))) subquery; Array ( [:db_condition_placeholder_0] => 26 [:views_join_condition_0] => 1 [:views_join_condition_1] => 1 [:views_join_condition_2] => 1 ) in views_plugin_pager->execute_count_query() (line 141 of /home/projhors/public_html/sites/all/modules/views/plugins/views_plugin_pager.inc).