When adding the contextual configuration link there is a duplication of the $form['#prefix'] if it existed in the form

CommentFileSizeAuthor
form_controller_prefix_redundancy.patch369 bytesjcmarco

Comments

sun’s picture

Project: Form controller » Form
Version: 6.x-2.x-dev » 6.x-1.x-dev
sun’s picture

Status: Needs review » Reviewed & tested by the community

oopsie. :)

dave reid’s picture

Status: Reviewed & tested by the community » Fixed

Committed a modified version that does $form += array('#cache' => TRUE, '#prefix' => ''); to CVS: http://drupal.org/cvs?commit=299412

jcmarco’s picture

But now, if you are defining form['#prefix'] = '' then you are losing any existing form['#prefix'] in the form, aren't you?

dave reid’s picture

No no. That only sets it to '' if it doesn't exist. That's how the array() += array() operator works.

Status: Fixed » Closed (fixed)

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

cerup’s picture

For 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.

dave reid’s picture

Status: Closed (fixed) » Fixed

Yep, 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

Status: Fixed » Closed (fixed)

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