Posted by kiamlaluno on November 7, 2009 at 11:19am
Jump to:
| Project: | Vertical Tabs |
| Version: | 6.x-1.0-rc1 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Dave Reid |
| Status: | closed (fixed) |
| Issue tags: | ghrh |
Issue Summary
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.| Attachment | Size |
|---|---|
| Voila_Capture_49.png | 22.96 KB |
Comments
#1
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
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
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
Fixed in CVS. Thanks!
#5
Automatically closed -- issue fixed for 2 weeks with no activity.
#6
Same php 5.3 error again with rc1
warning: Parameter 2 to drupal_retrieve_form() expected to be a reference, value given in .../vertical_tabs/vertical_tabs.admin.inc on line 45.This happens on admin/content/types/content-type after enabling the option "Expose vertical tabs selection on the edit content type forms."
#7
My apologies for the regression. I had used the wrong revision when re-adding the node type form options. I'll get it fixed today.
#8
Fixed back in CVS and will be available in the next release.
http://drupal.org/cvs?commit=326420
#9
Automatically closed -- issue fixed for 2 weeks with no activity.
#10
This problem still exists with RC1. When will a new RC be available? It's been about a year since the first release candidate.
#11
The patch should also remove the $args = array(...) just above the call as it is now dead code. I'd also like to request a new RC (or better yet, full release) be published.
#12
Also keen to see a new RC, will save me running more dev code ;)
#13
BUMP Dev code fixed the problem for me.
#14
PHP 5.3.4 (cli) (built: Dec 11 2010 17:46:49)
And still error:
Parameter 2 to drupal_retrieve_form() expected to be a reference, value given w pliku /home/xxx/public_html/modules/vertical_tabs/vertical_tabs.admin.inc, linia 45.
#15
Confirming dev fixes the issue on PHP 5.3.2
#16
oops accidentally changed status