Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I use upload of drupal core to attach file
When i not yet select any file and push "Attach" button. This bug show . (attach image)
Any one know why ?
Thanks !
Comment | File | Size | Author |
---|---|---|---|
#3 | upload-attach-file-1011442-3.patch | 2.93 KB | rouhipour.marjan |
attach bug.JPG | 29.06 KB | congtu2002c |
Comments
Comment #1
congtu2002c CreditAttribution: congtu2002c commentedComment #2
rouhipour.marjan CreditAttribution: rouhipour.marjan commentedHello,
Check the file name when uploading file.
Go to modules/upload/upload.module and modify "_upload_form" function.
Add"if($file->filename!='')" in for loop as follow:
foreach ($node->files as $key => $file) {
$file = (object)$file;
if($file->filename!=''){
$description = file_create_url($file->filepath);
.....
}
}
Hope it helps.
Comment #3
rouhipour.marjan CreditAttribution: rouhipour.marjan commentedThis is the patch file of this modificaiton in comment #2.
Comment #4
dddave CreditAttribution: dddave commentedComment #6
Fabianx CreditAttribution: Fabianx commentedPatch needs work. Not sure we'll ever fix this for D6 though ...