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.
Problem/Motivation
If you create a search page and add a search box, the query is sent to Solr and the results are returned. Then the form is built. If there is an incoming $_POST in the form, i.e. the search form has been submitted then the call to drupal_get_form results in the form being processed and a redirect is issued.
Then the search results are fetched again.
Proposed resolution
Move the drupal_get_form call before the call to fetch the results.
Remaining tasks
Review
User interface changes
None
API changes
None
Comment | File | Size | Author |
---|---|---|---|
apachesolr-form-redirect.patch | 1.15 KB | larowlan | |
Comments
Comment #1
Nick_vhGood catch! Let's test it and see :)
Comment #2
Nick_vhCommitted! Needs backport to 6.x-3.x
Thanks for your contribution. It's very much appreciated and I hope you continue to contribute to our issue queue. We can use all the help we can get.
Comment #5
mkalkbrennerComment #8
Nemanja CreditAttribution: Nemanja commentedFound that retain current filter doesn't work because it's being build after form
Comment #9
mkalkbrennerWhich version? 6.x or 7.x or both?
Does it work if you simply apply the reverse patch?
Comment #10
Nemanja CreditAttribution: Nemanja commentedI found it on D7, i submitted patch on https://www.drupal.org/node/2343001
Comment #11
mkalkbrennerI close this issue again. Let's continue the discussion on #2343001: Retain filters checkbox is missing.