Unable to sort by current moderation state. Column not found

Created on 1 July 2021, over 3 years ago
Updated 8 February 2024, 10 months ago

Enable sorting in views format settings. The column header becomes clickable but throws the following error:

Drupal\Core\Database\DatabaseExceptionWrapper: Exception in Admin Content[content]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'unknown' in 'order clause': SELECT "node_field_data"."nid" AS "nid", "users_field_data_node_field_data"."uid" AS "users_field_data_node_field_data_uid" FROM {node_field_data} "node_field_data" INNER JOIN {users_field_data} "users_field_data_node_field_data" ON node_field_data.uid = users_field_data_node_field_data.uid WHERE (node_field_data.status = 1 OR (node_field_data.uid = 5 AND 5 <> 0 AND 1 = 1) OR 1 = 1 OR 1 = 1) ORDER BY "unknown" ASC LIMIT 50 OFFSET 0; Array ( ) in Drupal\views\Plugin\views\query\Sql->execute() (line 1548 of core\modules\views\src\Plugin\views\query\Sql.php).

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡¨πŸ‡¦Canada chrisck BC, Canada

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024