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.
I wanted to sort the result set of nodes returned by nodequeue_api_autocomplete(), so I thought to use hook_query_alter(). Unforuntately, the only query tags available were "node_access" and "i18n_select". The attached patch provides a new tag "nodequeue_autocomplete", so that my implementation of hook_query_alter() can key off that tag.
Comment | File | Size | Author |
---|---|---|---|
#1 | add-nodequeue-tag-to-select-query-2446711-1.patch | 438 bytes | krisahil |
Comments
Comment #1
krisahil CreditAttribution: krisahil commentedAttaching patch.
Comment #2
calebtr CreditAttribution: calebtr commented++ for this patch - I'm not really sure of the politics of adding a tag or not, but this solution is way better than overriding several functions to change the query, or otherwise trying to identify the autocomplete query.