Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you enter, for example, "uj" into the site search box, it will return:
"You must include at least one positive keyword with 3 characters or more."
This is fine. But any legitimate, subsequent searches (e.g. "leg") using that same site search box FROM THAT PAGE won't work, and you'll continue to get that same message above.
Comment | File | Size | Author |
---|---|---|---|
#5 | commons_search.2019145.stuck_searches.patch | 622 bytes | jpontani |
#4 | commons_search.2019145.stuck_searches.patch | 584 bytes | jpontani |
Comments
Comment #1
ezra-g CreditAttribution: ezra-g commentedAre you experiencing this issue with Core search or Solr-powered search?
Comment #2
work77 CreditAttribution: work77 commentedHow can I tell? I just installed DC and it was one of the first things I checked. Whichever search box is at the top, just to the right of the "Events" menu button. Hope that helps.
Comment #3
jpontani CreditAttribution: jpontani commentedI am able to reproduce using Core search. Looking into it.
Comment #4
jpontani CreditAttribution: jpontani commentedThe issue is the search_block_form '#action' attribute points to something like '/search/content/uj' after searching, so any new search is basically searching for the same keywords every time.
Try this patch. It should remove the search keywords from the form action when using core search.
Comment #5
jpontani CreditAttribution: jpontani commentedActually this patch. The first one doesn't take into account hitting the page without searching, and messes up the form action.
Comment #6
work77 CreditAttribution: work77 commentedWow. That was my first time reporting a drupal issue. That was some speedy work by you guys. Thanks!
Comment #7
ezra-g CreditAttribution: ezra-g commentedAdding to the 3.4 radar for review.
Comment #8
ezra-g CreditAttribution: ezra-g commented#5 is committed. Thanks! http://drupalcode.org/project/commons.git/commit/7ed2445
Comment #10
vinmassaro CreditAttribution: vinmassaro commentedI came across this issue since we are seeing it happen in our sites, but we don't use Drupal Commons. I can reproduce the problem with a fresh Drupal 7 install with the out of the box search block. Can you move this issue to the D7 core issue queue? Thanks.
Comment #11
jcfiala CreditAttribution: jcfiala commentedIf you've found this ticket because you have the same problem with core search, this sort of a hook will fix the problem:
And yes, it's pretty much the same thing as the patch above.
Comment #12
serundeputy CreditAttribution: serundeputy at Common Media commentedfyi this is fixed in Drupal 7.42
https://www.drupal.org/node/2530652
So upgrade of core should solve the problem here.
cheers,
~Geoff
Comment #13
breinhart CreditAttribution: breinhart commentedCan anyone tell me where to apply the above patch? I tried several files in the modules/search directory, but I didn't have any luck. We took over a site that is running Drupal 6.20 and it's on our hosting server, and the search is the only thing that isn't working. I've researched it and tried many things but I can't get the search to work at all. I tried changing the minimum search parameter, re-indexed, (site will show 100% indexed) then I get the same result. This will eventually be switched over to a different CMS so we don't want to upgrade the core just to fix one issue. Note** the complete database was copied from the site where the site search works, but it's not working on our server for some reason. (php rolled back to 5.3 to test and same result happened) Thank you!