I have a custom module (written for Drupal 6) which defines a new content type. In Drupal 6 I have used several fieldsets and Vertical Tabs module to have the custom node form more clearly laid out. It looked like this
$form['event'] = array(
'#type' => 'fieldset',
'#title' => t('Event'),
'#weight' => -2,
);
While porting that module to Drupal 7, I altered that section to use the now-in-core functionality to
M$form['event'] = array(
'#type' => 'fieldset',
'#title' => t('Event'),
'#weight' => -2,
'#group' => 'vt_event',
'#collapsed' => true,
'#collapsible' => true,
);
$form['vt_event'] = array(
'#type' => 'vertical_tabs',
);
This indeed works just fine, when converting up to three fieldsets to the new structure. However, my form is more complex and I need at least five additional fieldsets. But as soon as I convert the fourth fieldset to enable it for vertical tabs, I suddenly get 500 server errors.
Does anyone have any idea why this is happening? It's always the fourth fieldset when it breaks the site and it's regardless which fieldset is the fourth (I tried to enable three other fieldsets first, but again it breaks on the fourth one which worked before).