Download & Extend

Previewlist nesting fieldsets

Project:Image FUpload
Version:6.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:markup, nesting

Issue Summary

Came across a typo in images.previewlist.inc (and images.previewlist.image.inc in the dev version), line 36:

<?php
      $form
[$node_image->nid]['preview_image'] = array(
       
'#prefix' => '<div class="image_fupload_preview">',
       
'#value' => _fupload_imagepreview($node_image, $node_type),
       
'#post' => '</div>',
       
'#weight' => 1,       
      );    
?>

'#post' should be replaced with '#suffix', like so:
<?php
      $form
[$node_image->nid]['preview_image'] = array(
       
'#prefix' => '<div class="image_fupload_preview">',
       
'#value' => _fupload_imagepreview($node_image, $node_type),
       
'#suffix' => '</div>',
       
'#weight' => 1,       
      );    
?>

Also, there seems to be a similar bug with a nested div in the form for creating images (node/add/image), which breaks certain themes. Will try to locate it and report back :)

Comments

#1

Thanks for your help.

#2

Status:active» closed (fixed)

Not able to reproduce my problem with the that was not closed in the form for creating images (node/add/image). I did find it, but can't reproduce it. Maybe my theme was doing it and I fixed it somehow without realizing it.. :)

#3

This one seems to have snuck its way into the new 3.0 alpha 1

Both previewlist for Image and Imagefield are affected.

#4

Does the problem still persist?

#5

Yes, on the version i downloaded yesterday it did (3.0 alpha 1, that is). Also in the dev from today (March 13).

images.previewlist.image.inc at line 36
images.previewlist.imagefield.inc at line 73

#6

Here's a patch :)

AttachmentSize
images.previewlist.image_.inc_.patch 507 bytes
images.previewlist.imagefield.inc_.patch 609 bytes

#7

Version:6.x-2.2» 6.x-3.x-dev
Status:closed (fixed)» fixed

Thank you very much for your patches.
Fixed now in CVS Head.

#8

Status:fixed» closed (fixed)

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

nobody click here