When the "Create image" form is displayed, the file upload tool is missing, and the word "error" appears in its place. This is the only module I am using that enables file uploads of any sort, so I haven't been able to verify if the problem is actually with image.module or with the form_file() function. Image.module was working properly under 4.2.0. I am running on Linux.

Comments

blaine-1’s picture

Project: Image » Drupal core
Component: User interface » Code

Update: I replaced the form_file() function in the cvs common.inc file with the function from v. 4.2.0. The image upload now works correctly, so the problem is not the image module. I'm going to attempt to move the bug report to another error. Apologies in advance if I break it.

(Is Drupal the correct project for this report?)

Austin-1’s picture

Component: Code » 0

To confirm: replacing the form_file(function) in the cvs common.inc file (around line 1054) with the form_file function from 4.2.0 (around line 881) does allow image upload via the browser (so it was not the image module, but common.inc). I did notice that you have to preview the image before submitting however. Is this the protocol? In any event,

Replaced:

function form_file($title, $name, $size, $description = 0, $fid = 0) {
if ($fid) { // Include file upload in case of preview
$extra = form_hidden("__file][$name", $fid);
}
return $extra . form_item($title, "\n", $description);
}

with this (working code):

function form_file($title, $name, $size, $description = 0) {
return form_item($title, "\n", $description);
}

Thanks Blaine.

Kjartan’s picture

Component: 0 » base system
Assigned: Unassigned » Kjartan

Should be ok again now.

Anonymous’s picture

Automatically closed due to inactivity (marked fixed for 14 days).