Active
Project:
Drupal Commons
Version:
6.x-2.10
Component:
Search
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2012 at 09:03 UTC
Updated:
15 Nov 2012 at 16:10 UTC
While working on an override of the search form, I discovered that commons_core_form_search_theme_form_alter() is called twice. Once directly and once by commons_core_form_alter(). In the latter all commons_core_form_* alter functions are called (again). It took some serious debugging to find this out and I like to prevent others from running into this situation. I don't understand the deeper reason behind this construction, but I propose to remove the following from commons_core_form_alter():
// Invoke our own form ID hooks
else {
$hook = "commons_core_form_{$form_id}_alter";
if (function_exists($hook)) {
$hook($form, $form_state);
}
Comments
Comment #1
ezra-g commented