Skip to content

[SD-1639] Views: table click sorting issue#746

Open
vincent-gao wants to merge 1 commit intodevelopfrom
feature/SD-1639-table-click-sorting-does-not-use-a-defined-sort-plugin
Open

[SD-1639] Views: table click sorting issue#746
vincent-gao wants to merge 1 commit intodevelopfrom
feature/SD-1639-table-click-sorting-does-not-use-a-defined-sort-plugin

Conversation

@vincent-gao
Copy link
Contributor

@vincent-gao vincent-gao commented Mar 3, 2026

Fxies an issue: views: Table click sorting does not respect a defined sort plugin.

Jira

https://digital-vic.atlassian.net/browse/SD-1639

Change

Drupal core's EntityField::clickSort() implements its own simple sorting logic (ORDER BY raw field value) which completely ignores any custom sort plugin defined for the same field.

the change fixes the issue by checking whether a matching sort handler exists in the view. If found, it delegates click sorting to that handler's query() method, ensuring table header click sorting respects the custom sort logic.

see https://www.drupal.org/project/drupal/issues/3174392 to get more details.

Fxies an issue: views: Table click sorting does not respect a defined sort plugin.
@vincent-gao vincent-gao force-pushed the feature/SD-1639-table-click-sorting-does-not-use-a-defined-sort-plugin branch from 7d5b87a to 5f91b71 Compare March 3, 2026 02:55
@vincent-gao vincent-gao self-assigned this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant