Moodle

misleading error message during file upload

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.6.3, 1.9
  • Fix Version/s: None
  • Component/s: Libraries
  • Labels:
    None
  • Environment:
    Ubuntu 6.06, Apache 2.0.55, MySQL 5.0.22, PHP 5.1.2, Moodle 1.6.3 (2006050530)
  • URL:
    \lib\uploadlib.php
  • Affected Branches:
    MOODLE_16_STABLE, MOODLE_19_STABLE

Description

When uploading a file beyond the file max with ClamAV installed I get the error "A required parameter (id) was missing". I consider this misleading as it vaguely refers to something with the code; however, I suspect that what is happening is that Moodle attempts to upload the file and pass it to ClamAV for analysis; however, because it is too large it fails and the id does not get passed. What I think should happen is that Moodle ought to check the file size limit and compare it to the file size of the file. If it is too large then Moodle should report that the file is too large to be uploaded. If ClamAV is not being used then Moodle reports that the file was too large. This lets the user know the reason for the problem is a file that is too large. I would like for it to do the same if ClamAV is being used.

Issue Links

Activity

Hide
Teresa Gibbison added a comment -

I can confirm this error message comes up regardless of ClamAV - we do not use ClamAV and see the error when a file that is larger than the limit is uploaded. This message "A required parameter (id) was missing" is confusing for staff. I would like to see a more user friendly message appear, eg "The file you are trying to upload is larger than the upload limit" or similar.
Cheers
Teresa

Show
Teresa Gibbison added a comment - I can confirm this error message comes up regardless of ClamAV - we do not use ClamAV and see the error when a file that is larger than the limit is uploaded. This message "A required parameter (id) was missing" is confusing for staff. I would like to see a more user friendly message appear, eg "The file you are trying to upload is larger than the upload limit" or similar. Cheers Teresa
Hide
Teresa Gibbison added a comment -

additional information - we are using Moodle 1.9.5+ (Build: 20090630)

Show
Teresa Gibbison added a comment - additional information - we are using Moodle 1.9.5+ (Build: 20090630)
Hide
Anthony Borrow added a comment -

Thanks Teresa for sharing your experience. Hopefully we can get this patched up soon. Peace - Anthony

Show
Anthony Borrow added a comment - Thanks Teresa for sharing your experience. Hopefully we can get this patched up soon. Peace - Anthony
Hide
Anthony Borrow added a comment -

adding 1.9 as an affected version just to make sure this does not fall through the cracks - Peace - Anthony

Show
Anthony Borrow added a comment - adding 1.9 as an affected version just to make sure this does not fall through the cracks - Peace - Anthony
Hide
Anthony Borrow added a comment -

Teresa - I am resolving this issue as one that I cannot reproduce. I just tried uploading a file that exceeded the limit both with and without Clam AV enabled. In both cases I received the appropriate error message that the file size was too large. At this point, I cannot reproduce the error; however if you have steps to reproduce it let me know and I will re-open the issue. Peace - Anthony

Show
Anthony Borrow added a comment - Teresa - I am resolving this issue as one that I cannot reproduce. I just tried uploading a file that exceeded the limit both with and without Clam AV enabled. In both cases I received the appropriate error message that the file size was too large. At this point, I cannot reproduce the error; however if you have steps to reproduce it let me know and I will re-open the issue. Peace - Anthony
Hide
Anthony Borrow added a comment -

Adding screen shot showing the correct error message - I am not sure when this issue was fixed but as of 1.9.7+ it does not seem to be an issue. Peace - Anthony

Show
Anthony Borrow added a comment - Adding screen shot showing the correct error message - I am not sure when this issue was fixed but as of 1.9.7+ it does not seem to be an issue. Peace - Anthony
Hide
J Rob added a comment -

Attempting to upload a too-large file to a course. Moodle 1.9.7+ (Build: 20091230)

Show
J Rob added a comment - Attempting to upload a too-large file to a course. Moodle 1.9.7+ (Build: 20091230)
Hide
Anthony Borrow added a comment -

J Rob - Can you provide details on how to reproduce this. Last I checked I could not reproduce it on a test server and a production server. Peace - Anthony

Show
Anthony Borrow added a comment - J Rob - Can you provide details on how to reproduce this. Last I checked I could not reproduce it on a test server and a production server. Peace - Anthony
Hide
J Rob added a comment -

Anthony,

(Sorry about the limited documentation in my post; I would have included more information if I'd known the image description would appear as a normal comment.)

Yesterday a user contacted me because she was getting the error shown in my screenshot when attempting to upload a 17MB PowerPoint presentation. The Moodle information is in my previous comment. It's running on Windows Server 2003, IIS, PHP version 5.2.0, MySQL version 4.1.22.

PHP's configuration includes:
memory_limit = 8M
post_max_size = 8M
upload_max_filesize = 8M

The course's maximum upload size is also set to 8 MB.

The user was attempting to upload the file using the "Files" option in the Administration block, but I was also able to reproduce the problem by trying to upload via "Add a resource" -> "Link to a file or website" -> "Upload".

I have confirmed that the user can successfully upload files that are within the 8 MB limit.

Show
J Rob added a comment - Anthony, (Sorry about the limited documentation in my post; I would have included more information if I'd known the image description would appear as a normal comment.) Yesterday a user contacted me because she was getting the error shown in my screenshot when attempting to upload a 17MB PowerPoint presentation. The Moodle information is in my previous comment. It's running on Windows Server 2003, IIS, PHP version 5.2.0, MySQL version 4.1.22. PHP's configuration includes: memory_limit = 8M post_max_size = 8M upload_max_filesize = 8M The course's maximum upload size is also set to 8 MB. The user was attempting to upload the file using the "Files" option in the Administration block, but I was also able to reproduce the problem by trying to upload via "Add a resource" -> "Link to a file or website" -> "Upload". I have confirmed that the user can successfully upload files that are within the 8 MB limit.
Hide
Anthony Borrow added a comment -

Just to be clear - what are your ClamAV settings? When I created this issue, it was because of the use of ClamAV that was reporting back a different issue. I'll have to see if I can get Moodle up and running on a Windows test machine and see if I can reproduce the problem. Peace - Anthony

Show
Anthony Borrow added a comment - Just to be clear - what are your ClamAV settings? When I created this issue, it was because of the use of ClamAV that was reporting back a different issue. I'll have to see if I can get Moodle up and running on a Windows test machine and see if I can reproduce the problem. Peace - Anthony
Hide
J Rob added a comment -

It looks as though ClamAV is not installed on the server in question. I realize that might make this an unrelated issue. (If that is the case, my apologies for adding to this issue!)

Show
J Rob added a comment - It looks as though ClamAV is not installed on the server in question. I realize that might make this an unrelated issue. (If that is the case, my apologies for adding to this issue!)

People

Vote (8)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: