Performing a search on the site for a particular word returns expected results (say: "quandong" - in default sample content). Choosing the first item of the results, then choosing the group ("Boston" in this instance). Then, in the search box (now defaulting to "This group", search for the same word "quandong". The result is "Your search yielded no results", and the search term displayed is "quandong type:commons_search".


rcross’s picture

Priority: Normal » Major
mariusm’s picture

Issue summary: View changes

Occurs in 7.x-3.9

gold.eagle’s picture

I am investigating something very similar. It seems to me that in commons_search_form_alter() the code sets up for a SOLR group search, but does not add its processing function commons_search_search_form_submit() into the '#submit' callback stack on the search form. Thus, the commons_search_search_form_submit() function does not get called and the form does not get re-directed to a URL with the SORL filter applied to limit the results to the given group.

I added
$form['#submit'][] = 'commons_search_search_form_submit';
to the end of the function and then the "This Group" search worked thereafter.

Similarly, but a completely different problem, is the commons_search_search_form_submit() function does not handle a SOLR query for users, to limit search results only to users (when a person selects 'Users' from the search form's dropdown list).

lizjkriz’s picture

I found the same problem when using Commons Search with the default core search module, and I agree that it seems like commons_search_search_form_submit() is not being called at all.

Adding $form['#submit'][] = 'commons_search_search_form_submit'; to commons_search_form_alter() as suggested in #3 worked for me as well - any chance this could be incorporated into Commons?