Closed (fixed)
Project:
Form
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Dec 2009 at 23:11 UTC
Updated:
23 Feb 2010 at 19:50 UTC
When adding the contextual configuration link there is a duplication of the $form['#prefix'] if it existed in the form
| Comment | File | Size | Author |
|---|---|---|---|
| form_controller_prefix_redundancy.patch | 369 bytes | jcmarco |
Comments
Comment #1
sunComment #2
sunoopsie. :)
Comment #3
dave reidCommitted a modified version that does
$form += array('#cache' => TRUE, '#prefix' => '');to CVS: http://drupal.org/cvs?commit=299412Comment #4
jcmarco commentedBut now, if you are defining form['#prefix'] = '' then you are losing any existing form['#prefix'] in the form, aren't you?
Comment #5
dave reidNo no. That only sets it to '' if it doesn't exist. That's how the array() += array() operator works.
Comment #7
cerup commentedFor this to work for me I had to remove the dot before the '=':
$form['#prefix'] .= $output . $form['#prefix'];
to
$form['#prefix'] = $output . $form['#prefix'];
Otherwise I get duplicate content rendered.
Comment #8
dave reidYep, that confirmed the current code would duplicate the $form['#prefix'] value if it wasn't an empty string. Fixed in CVS and will be available in the next development build within 12 hours.
http://drupal.org/cvs?commit=326452