I've been using the default search block to allow users to enter a search string before going to the actual Solr search page. This has worked fine with "Make Apache Solr Search the default" enabled.

I updated to 6.x-1.3 this morning and it no longer works: if you enter a search string in the block and submit, it directs you to /search/apachesolr_search but there's no search string appended, so the page has no results. If you enter the search string in the /search/apachesolr_search page, it works fine.

I've cleared the cache and checked the dblog for errors, but nothing's looking suspicious. Any ideas please?

CommentFileSizeAuthor
#13 1138602-13.patch782 bytespwolanin

Comments

pwolanin’s picture

I'm not seeing this bug. Which page are you using as the starting point?

Are you using the theme search box or the module block?

adam_b’s picture

Thanks for the quick response:
- The search form block is set to appear on all pages except search*.
- It's just called "Search form" in the block list; I believe that it's the default module block. There's no template for it in the theme directory.

I'm on Drupal 6.19 at the moment - I'm assuming that D6.20 isn't a requirement?

You can take a look at http://onlineservices.cpag.org.uk/ - the search isn't normally accessible to anonymous users but I've enabled it temporarily.

pwolanin’s picture

Yes, I see that it doesn't work, but I'm still not sure that's it's not a site-specific problem. Perhaps you have some other form_alter that's interfering?

For a start look at this function in the code, and perhaps add some debugging there:

/**
 * Process a block search form submission.
 *
 * @see search_box_form_submit()
 */
function apachesolr_search_search_box_form_submit($form, &$form_state) {
...
}
drtrueblue’s picture

I'm also seeing the exact same issue with the default block on my site. Additionally, the apache_solr_autocomplete feature is no longer functional. For what it is worth, greatly appreciate the excellent support!

pwolanin’s picture

Well, it's possible that some change in the last release broke http://drupal.org/project/apachesolr_autocomplete but you'd need to file an issue there. It's a totally separate project that only janusman maintains.

Can you try disabling that module and see if the search block issue is resolved?

@adam_b do you have that module enabled also?

adam_b’s picture

No, I don't have autocomplete installed.
Sorry, I haven't had time to take up your suggestion re debugging (my PHP knowledge is very minimal).

drtrueblue’s picture

I have the issue regardless of the autocomplete module is enabled or disabled.

ianchan’s picture

I have encountered the same problem after upgrading from 1.2 to 1.4 (I also tried 1.3 without success).

I noticed that after upgrading to 1.4, the value in the action attribute of the form tag for the search block changes to "/search/apachesolr_search". However, in version 1.2, the attribute value is simply "/". Don't know if that is helpful or not?

pwolanin’s picture

pwolanin’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

I am not able to reproduce locally. Can you please try with a core theme like Garland?

Eaglecanada’s picture

I use 6.x-1.3.

The "enable Solr as the default search" only works for search box on the theme setting. not working in the module block. use core theme Garland.

I had enabled the search box from the theme settting, also enable the search form block ( placed at different areas). same results: only works for search box. not search fomr (block). When conduct a search on search form(block), it jumps to the default search/apachesolr_serch page witht eh content/search/attachments/directories/users tabs (no serch result on this page, just empty box, user has to re-entry the search term )

pwolanin’s picture

Status: Postponed (maintainer needs more info) » Active

ok, i think I might know now what's happening. Do you have the search block disabled on the search/apachesolr_serch page?

If so, this is indeed going to fail. Patch coming soon.

pwolanin’s picture

Status: Active » Needs review
StatusFileSize
new782 bytes

This fixes it for the affected site I'm working on.

pwolanin’s picture

Priority: Normal » Major
Status: Needs review » Fixed

committed.

adam_b’s picture

Yes, I do have the search block disabled on the search/apachesolr_search page.

I can confirm that the 6.x-1.x-dev release dated 25 May has fixed this - thanks very much.

ianchan’s picture

Yes, thank you for fixing. Problem resolved with 1.5.

Status: Fixed » Closed (fixed)

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