Closed (works as designed)
Project:
Drupal core
Version:
4.7.0-beta1
Component:
user system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2005 at 05:01 UTC
Updated:
10 Dec 2005 at 19:10 UTC
Implementing this function in a module causes the user registration page to be blank.
I've narrowed it down to the form group array. If it has any content, the page doesn't display. If it's empty, the page displays with errors.
This works:
function test_user($op, &$edit, &$user, $category = NULL) {
switch ($op) {
case 'register':
return array( array() );
}
}
This doesn't:
function test_user($op, &$edit, &$user, $category = NULL) {
switch ($op) {
case 'register':
return array( array('title' => t('Test'), 'data' => form_textarea(t('Test'), 'test', '', 70, 3, t('Test form field.'), NULL, TRUE), 'weight' => 1 ) );
}
}
Comments
Comment #1
chx commentedform_textarea is gone.
Comment #2
spankalee commentedI tried replacing the form_textarea call with just a string and it still didn't work (showed a blank page).
Like this:
I also tried this:
Basically if the form group array has any content at all the user reg form crashes very ungracefully.
The sample code in the CVS HEAD docs uses form_textarea. Should this bug instead be a feature request for an error rather than a blank page. More critically, should hook_user no longer return an array of form groups? Where's the docs on what it should return? If this is really by design, then what's the right way to do it?