Can't sort on view by moderation state

Created on 1 July 2022, over 2 years ago
Updated 20 April 2023, over 1 year ago

Problem/Motivation

If i make the view sortable by current moderation state i get this error when trying to sort on that column:
Drupal\Core\Database\DatabaseExceptionWrapper: Exception in Media[media]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'unknown' in 'order clause': SELECT "media_field_data"."mid" AS "mid", "group_content_field_data_media_field_data"."id" AS "group_content_field_data_media_field_data_id" FROM "media_field_data" "media_field_data" INNER JOIN "group_content_field_data" "group_content_field_data_media_field_data" ON media_field_data.mid = group_content_field_data_media_field_data.entity_id AND group_content_field_data_media_field_data.type IN ( :views_join_condition_0__0, :views_join_condition_0__1, :views_join_condition_0__2, :views_join_condition_0__3 ) WHERE (media_field_data.status = 1 OR (media_field_data.uid = 1 AND 1 <> 0 AND 1 = 1) OR 1 = 1 OR 1 = 1) ORDER BY "unknown" ASC LIMIT 50 OFFSET 0; Array ( [:views_join_condition_0__0] => sites-group_media-audio [:views_join_condition_0__1] => sites-group_media-document [:views_join_condition_0__2] => sites-group_media-image [:views_join_condition_0__3] => sites-group_media-video ) in main() (line 19 of index.php).

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dianacastillo Miami

Live updates comments and jobs are added and updated live.
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