Adding query string to search form#3439
Adding query string to search form#3439aaronschachter merged 3 commits intoDoSomethingArchive:devfrom
Conversation
|
looks good to me, I'd wait for @aaronschachter as I'm still new to Drupal |
There was a problem hiding this comment.
Isn't it possible that the query_string wouldn't be set on just a regular page load? Since the search form appears on every page. Can you confirm in the error logs this isn't flooding with php notice / warnings?
There was a problem hiding this comment.
@aaronschachter hmmm, no i'm not seeing any errors or warnings. Maybe because I am only passing in the query string argument when rendering the form on the 404 page. But I can do a double check for the existence of the query string to be more defensive.
There was a problem hiding this comment.
It might just be part of the way a drupal search_form is rendered. If errors aren't not showing up in places like the homepage and stuff, feel free to keep as is.
There was a problem hiding this comment.
@aaronschachter yea, using i'm using drupal_build_form() to render this particular search form which allows you to pass in a form state. So it probably doesn't effect other forms rendered on the page. Not seeing errors related to the search for on any other pages, but I added the double check just in case, as I do think it is important to be more defensive.
|
@aaronschachter is this approved? |
|
Ship it 👍 |
Adding query string to search form
Fixes #3426 . Adding the query string used in the 404 search to the text field in the search form displayed on the 404 page.
@aaronschachter @deadlybutter