I have a custom module and a template to alter the appearance of my node submission forms, á la these instructions.
My module consists of three functions:
- A
hook_form_alter()
that works fine - A
hook_theme()
that doesn't do anything but return an array, even if you enter other code beforereturn
(not sure if this is by design) - A
hook_preprocess_HOOK()
that is currently empty
dpm()
doesn't seem to do anything in hook_preprocess_HOOK()
, although krumo()
on the same variables sort of works. It sets a Drupal message that reads Array: [n] items
but can't be expanded or inspected at all.
In my template, print_r($form);
prints out the form array as expected. dpm('self-aware roomba');
sets a Drupal message of "self-aware roomba" as expected. but dpm($form)
; does nothing and throws no error.
Everything except my hook_form_alter()
is exactly as it appears in the linked tutorial. I even tried pulling out the entire hook_form_alter()
to see if it works without it; it doesn't.
What could be causing dpm()
/krumo()
to fail silently?
dpm('self-aware roomba');
wouldn't work otherwise andkrumo()
wouldn't returnArray: [n] items
, it would just cause a fatal PHP error, which would cause my logs to not be empty.