Steps to reproduce:
1) Download Drupal 7.7 and Search Configuration 7.x-1.0.
2) Install Drupal, Search, & Search Configuration.
3) Configure Search and Search Configuration permissions such that all roles have "Use search" and "Basic page: Search content of this type", but no other permissions.
4) Create a Basic page with the title of "St. John's Mercy Medical Center".
5) Run cron to index the node.
6) While still logged in as UID 1, search for (no quotes) "st. john's mercy", then "john's", then "st. john". You will see the node you created.
7) Now, logout, and perform the same search. You will NOT see the node.
8) Still logged out, search for "john" or "mercy", and you WILL see the node.
It appears that the punctuation breaks the search somehow, for all users except UID 1. In the setup above, authenticated users, and even administrators have the same problem as anonymous users.
UID 1 finds the result because the query is not altered in search_config_query_node_access_alter for this user. But if the query is altered, then searches with periods or apostrophes just don't work.
Any idea why?
Comments
Comment #1
joelstein commentedHere's one of the queries generated on the search page. Notice that the Search module searches for the word "article" (which is a restricted content type) instead of the search term "john". I wonder if this is a bug with the search module? It seems like it's using the wrong variable substitution.
Comment #2
joelstein commentedI think this is related to the core issue #1202416: Search is not working with node access turned on, and possibly #1112854: Subqueries use wrong arguments.
Comment #3
alan d. commented@joelstein
Nice find with the core issues, will track with interest!
Comment #4
xjmA fix has been committed for the core issue, so this problem should be resolved in Drupal 7.9 when it comes out in a week or two. Marking duplicate of #1112854: Subqueries use wrong arguments.