Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Given the following table header structure:
Array
(
[0] => operations
[1] => Array
(
[data] => title
[field] => n.title
[sort] => asc
)
)
Tablesort mostly understands that it should use array[1] to retrieve it's sorting information except for the 'sort' component, which tries to use array[0] and return an 'o' instead of 'asc' or 'desc'. This is mostly a developer usability issue since if header was:
Array
(
[0] => Array
(
[data] => operations
)
[1] => Array
(
[data] => title
[field] => n.title
[sort] => asc
)
)
It would work as expected.
Comment | File | Size | Author |
---|---|---|---|
tablesort_sort.patch | 604 bytes | matt westgate | |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedthis patch adds robustness, at very little cost. +1
Comment #2
Dries CreditAttribution: Dries commentedCommitted to HEAD and DRUPAL-4-4. Thanks.
Comment #3
(not verified) CreditAttribution: commentedComment #4
(not verified) CreditAttribution: commented