Module settings are not showing up

kiamlaluno - November 7, 2009 - 11:19
Project:Vertical Tabs
Version:6.x-1.x-dev
Component:User interface
Category:bug report
Priority:normal
Assigned:Dave Reid
Status:closed
Description

See the attached screenshot. On the content type edit form, I cannot select which fieldsets should be rendered by Vertical tabs. To notice that there is a module that actually add a fieldset in the node edit form.

As side note, I also get the following error message, in the content type edit form:

warning: Parameter 2 to drupal_retrieve_form() expected to be a reference, value given in /Library/WebServer/Documents/dr61/sites/all/modules/vertical_tabs/vertical_tabs.module on line 163.

AttachmentSize
Voila_Capture_49.png22.96 KB

#1

kiamlaluno - November 7, 2009 - 11:21

I forgot to say I am using the development snapshot from November 7; if the code has been already changed, and I need to wait 1 hour to get the new archive, then I apologize for this report.

#2

kiamlaluno - November 7, 2009 - 11:30

The line for which the error is report is contained in the following function:

<?php
function vertical_tabs_node_type_form(&$form, $node_type) {
 
module_load_include('inc', 'node', 'node.pages');

 
// Build a psuedo-node for a sample node form.
 
$node = (object) array(
   
'type' => $node_type,
   
'name' => '',
   
'vid' => 0,
  );

 
// Build a sample node form to find fieldsets.
 
$node_form_state = array('values' => array());
 
$node_form_id = $node_type .'_node_form';
 
$args = array(
   
$node_form_id,
   
$node_form_state,
   
$node
 
);
 
$node_form = call_user_func_array('drupal_retrieve_form', $args);
 
$node_form['#post'] = $node_form_state['values'];
 
drupal_prepare_form($node_form_id, $node_form, $node_form_state);
 
uasort($node_form, 'element_sort');

 
// Find all fieldsets.
 
$fieldsets = array();
  foreach (
element_children($node_form) as $key) {
    if (isset(
$node_form[$key]['#type']) && $node_form[$key]['#type'] == 'fieldset' && isset($node_form[$key]['#title'])) {
     
$fieldsets[$key] = $node_form[$key]['#title'];
    }
  }

 
$form['vertical_tabs'] = array(
   
'#type' => 'fieldset',
   
'#title' => t('Vertical tabs'),
   
'#collapsible' => TRUE,
   
'#collapsed' => TRUE,
   
'#description' => t('The selected fieldsets will be rendered as vertical tabs for this content type. The tabs are rendered in the same version as the original form\'s fieldsets.'),
  );
 
$form['vertical_tabs']['vertical_tabs_fieldsets'] = array(
   
'#type' => 'checkboxes',
   
'#options' => $fieldsets,
   
'#default_value' => vertical_tabs_fieldsets($node_type),
  );
}
?>

The line that causes the error I reported contains $node_form = call_user_func_array('drupal_retrieve_form', $args).

As last note, I am having the issue on Mac OS X 10.6, which runs PHP 5.3.0.

#3

Dave Reid - November 7, 2009 - 14:42
Assigned to:Anonymous» Dave Reid

This is a PHP 5.3 error. I'm going to replace this with a direct call to drupal_retrieve_form($node_form_id, $node_form_state);

#4

Dave Reid - November 7, 2009 - 16:45
Status:active» fixed

Fixed in CVS. Thanks!

#5

System Message - November 21, 2009 - 16:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.