Closed (fixed)
Project:
Nodequeue
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Apr 2014 at 19:42 UTC
Updated:
30 Jun 2016 at 10:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
kporras07 commentedComment #3
kporras07 commentednodequeue-autocomplete-does-not-pass-autocomplete-text-to-hook.patch queued for re-testing.
Comment #5
kporras07 commentedUpdated version of the patch
Comment #6
kporras07 commentedComment #7
steven jones commentedComment #8
steven jones commentedThis code looks like it just comes from Drupal 5 land.
Maybe it should just be updated send the $query object, or just add some tags and then use hook_query_TAG_alter
Comment #9
greggadsdon commentedThis patch removes the "hook_nodequeue_autocomplete call and adds the tag "nodequeue_api_autocomplete" to the query which allows other modules to step in with hook_query_TAG_alter() and change the query. $queue and $subqueue are also added to the metadata.
A patch for Smartqueue language with hook_query_TAG_alter() implemented can be found in comment #1 at https://drupal.org/node/2130727.
Comment #10
pverrier commented#9 worked for me, thanks.
Comment #11
karlsheaPatch in #9 along with patch in smartqueue_language fixed the issue I was having, thanks.
Comment #12
venutip commentedConforming that the patch from #9 allows you to modify the autocomplete query using
hook_query_TAG_alter().Comment #13
jphuxley commentedTried patch in #9 which worked and allowed me to use hook_query_TAG_alter(), thanks.
Comment #14
pverrier commentedRerolled patch #9 for 7.x-2.x-dev
Comment #15
pverrier commentedCan this patch be commited? Thanks.
Comment #16
patrickscheffer commentedAlthough adding a query tag is a nice feature, it didn't fulfill my requirements.
I needed to alter the output text, to be specific: I wanted to append the content type to the result so the user would know what type of content he or she is adding to the nodequeue.
For that I created the enclosed patch.
I've created hook_nodequeue_api_autocomplete which is a direct copy from this function:
This allows us to alter the query AND the results.
Comment #17
fizk commentedPerhaps the best of both worlds? This combines #14 and #16.
Comment #18
fizk commentedThis patch executes the query before calling hook_nodequeue_api_autocomplete, and passes the query results instead of the query object.
Comment #19
patrickscheffer commented@fizk Great idea separating the functions, this allows the user to easily modify either the query or the results. I considered your solution when creating my patch, but in my case I needed to alter both so one function suited me more. Perhaps a little egocentric. :)
Comment #20
renrhaf+1 for comment #18
Comment #21
fizk commented@PatrickScheffer :P
Setting to RTBC from #19 and #20.
Comment #23
fizk commentedCommitted, thanks everyone!
Comment #24
renrhafExcellent, thank you very much !
Any idea if/when this could be available as a tagged release ? :)
Comment #25
fizk commented@Renrhaf 7.x-2.1 as of yesterday :-)