Posted by tjodolv on February 17, 2009 at 8:25pm
3 followers
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
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 :)
#7
Thank you very much for your patches.
Fixed now in CVS Head.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.