This can cause a lot of confusion. Attached patch fixes this by using hook_menu_alter().

CommentFileSizeAuthor
search_ranking_override_01.patch2.92 KBcwgordon7

Comments

BlakeLucchesi’s picture

I had originally thought to encourage the use of core searches module to disable the core content search and user search but this seems a good route to go to decrease dependencies, esp since we are already overriding the core search ranking form items in the settings page anyways.

BlakeLucchesi’s picture

I added the patch and committed the file but there is an issue with the search_ranking_view() function not being able to get the keys for the search. I am going to continue looking into this as well as completing the simpletest in the coming day.

BlakeLucchesi’s picture

I altered the patch and committed. The changes make it so that search/node is now handled by search_ranking, which makes sure that when people use this module on an existing site their search results pages will have no changes.

BlakeLucchesi’s picture

Status: Needs review » Fixed
BlakeLucchesi’s picture

Status: Fixed » Needs work

Re-opened ticket. The search button sends the search page to search/search_ranking/$keys, this needs to be altered to so that all content searches are sent to search/node/$keys.

BlakeLucchesi’s picture

Status: Needs work » Active

I just committed code which aims to fix this. In search_ranking.pages.inc there is a call to drupal_get_form(), which takes the search type as a parameter, since we are overriding the type to be search_ranking, we needed to hard code in a value of 'node', so that we still get the node search form even though search_ranking is handling the search requests.

Please test and make sure it works. When I tried it even the advanced search features were working as expected.

BlakeLucchesi’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.