Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292900

Error When Invoking drupal_get_form('search_box') Outside of Search Module - $form_id is Extraneous

$
0
0

Problem/Motivation

While integrating a search box with a custom global nav, which does not allow for the inclusion of the search block, I unsuccessfully invoked drupal_get_form('search_box'). The drupal_get_form call failed due to the addition of the $form_id argument, which is not expected.

Proposed resolution

The value of $form_id is the name of the function (in this case 'search_box') so no loss of information occurs upon removal of this argument. I searched through the codebase and did not find any references to the search_box with three arguments.

Patch coming shortly.

Remaining tasks

- None

User interface changes

- None

API changes

- Removed $form_id from the search_box function to conform with drupal_get_form argument expectations

- None

Original report by mmikitka


Viewing all articles
Browse latest Browse all 292900

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>