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.
Calling search_form is not very flexible.
- Now we can have the settings on, but this going to break the website if the search module is not enable.
- the form is not cached (like with block)
I think is better to create a specific regions for the search box and use a hook_form_alter to eventually adapt the default search form.
Comments
Comment #1
kevinquillen CreditAttribution: kevinquillen commentedYeah... seems rather odd to be inflexible like that. Disabling Search module causes a fatal PHP error.
Comment #2
frankbaele CreditAttribution: frankbaele commentedYou are right this needs to be fixed, its too inflexible
Comment #3
frankbaele CreditAttribution: frankbaele commentedComment #4
andregriffin CreditAttribution: andregriffin commentedComment #5
andregriffin CreditAttribution: andregriffin commentedComment #6
natted CreditAttribution: natted commentedComment #7
frankbaele CreditAttribution: frankbaele commentedThis issue has been fixed for the error part, but i agree that the search field shouldn't be hard-coded like that and will not be in the 3.x branch