Closed (fixed)
Project:
Search Autocomplete
Version:
7.x-2.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Feb 2012 at 13:36 UTC
Updated:
25 May 2012 at 19:20 UTC
Disallowed node titles are presents in the list when autocomplete search is performed.
Comments
Comment #1
dom. commentedHi!
Do you mean disallowed nodes because of user permissions ? If so, you can correct this using the SQL query. If you need to access an array of the roles of the current user using autocompletion, you can change:
In search_autocomplete.module:
change lign 24 to:
global $language, $user;change lign 52 to:
This will offer you the :roles placeholder.
Even with this, I must confess the SQL statment will not be easy-peasy. That's why I'm working on a version to use VIEWS module to easily create the suggestions without using SQL. I hope to finish this new feature soon.
Thanks for using this module,
Regards,
Miro.
Comment #2
DizelGenerator commentedHi Miroslav!
Thanks for your answer!
Yes, I've meant disallowed nodes because of user permissions. I've understood your idea and did some another changes for it works. In search_autocomplete.modile line 24 changes to:
To line 56 add (without checking for $query really has ':roles' placeholder it doesn't work):
The SQL statement for using this workaround:
Comment #3
dom. commentedThanks a lot for sharing! I'm sure it will help others!
I will definitely improve the module to produce the JSON callback suggestions using views cause this is not easy enough for end-user.
Miro.
Comment #5
OldAccount commentedI'd love to have this feature added, and making the option available via the UI is always preferred over module hacks. I'm using the Restrict Node Page View module to restrict direct access to the full node for certain content types, but you can still type in a restricted node title and see it come up in the autocomplete list.
Great module, by the way, thank you for all your work!