Closed (duplicate)
Project:
Drupal core
Version:
x.y.z
Component:
search.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2006 at 19:15 UTC
Updated:
17 Feb 2006 at 13:48 UTC
I get the search form back (instead of a list of users) when trying to search users in /admin/user/search.
Comments
Comment #1
ankur commentedI can confirm this and can also add that the problem occurs in the section of code in user.module:
In this code, the call to search_data() should return the themed search results, however, the call to search_form() on the same line results in a call to drupal_get_form():
I have verified, w/ print statements, that the call to drupal_get_form() results in the execution of the drupal_goto() at the very end of drupal_get_form(). This, in turn, forces a redirect which caues $_POST[] to lose its values. Not sure what the exact cause is. The problem doesn't occur in the search form at q=search, because the drupal_goto() includes the search terms as a $_GET[] variable appended to the URL. In short, because of the drupal_goto(), there are no values set in $_POST[]. So, the code executes again and an unset $_POST['edit']['keys'] value is passed to the search_data() call in user_admin(). That's why there're no search results and a blank search form.
drupal_get_form() is a maze of code I couldn't follow this late into the night, but it is defined in form.inc.
Comment #2
chx commentedhttp://drupal.org/node/49799