Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-25497

Non-JavaScript file uploader generates warnings and doesn't save the uploaded file

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Files API
    • Labels:
      None
    • Environment:
      Fedora, 2.0 (Build: 20101201)
    • Database:
      PostgreSQL
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      With Javascript disabled, I get all these errors when I click "Upload this file" under "Upload a file" Repo. I have been testing under an assignment.

      [Thu Dec 02 13:06:46 2010] [error] [client 127.0.0.1] PHP Warning: Missing argument 1 for repository_upload::upload(), called in /var/www/moodle20/repository/filepicker.php on line 114 and defined in /var/www/moodle20/repository/upload/lib.php on line 44, referer: http://localhost/moodle20/repository/filepicker.php?ctx_id=9095&itemid=928550035&env=filemanager&course=180&maxbytes=0&maxfiles=20&subdirs=1&sesskey=5DT9r8PyWS&action=list&draftpath=%2F&savepath=%2F&repo_id=3

      [Thu Dec 02 13:06:46 2010] [error] [client 127.0.0.1] PHP Warning: Missing argument 2 for repository_upload::upload(), called in /var/www/moodle20/repository/filepicker.php on line 114 and defined in /var/www/moodle20/repository/upload/lib.php on line 44, referer: http://localhost/moodle20/repository/filepicker.php?ctx_id=9095&itemid=928550035&env=filemanager&course=180&maxbytes=0&maxfiles=20&subdirs=1&sesskey=5DT9r8PyWS&action=list&draftpath=%2F&savepath=%2F&repo_id=3

      [Thu Dec 02 13:06:46 2010] [error] [client 127.0.0.1] PHP Notice: Undefined variable: maxbytes in /var/www/moodle20/repository/upload/lib.php on line 103, referer: http://localhost/moodle20/repository/filepicker.php?ctx_id=9095&itemid=928550035&env=filemanager&course=180&maxbytes=0&maxfiles=20&subdirs=1&sesskey=5DT9r8PyWS&action=list&draftpath=%2F&savepath=%2F&repo_id=3

      [Thu Dec 02 13:06:46 2010] [error] [client 127.0.0.1] PHP Notice: Undefined variable: maxbytes in /var/www/moodle20/repository/upload/lib.php on line 103, referer: http://localhost/moodle20/repository/filepicker.php?ctx_id=9095&itemid=928550035&env=filemanager&course=180&maxbytes=0&maxfiles=20&subdirs=1&sesskey=5DT9r8PyWS&action=list&draftpath=%2F&savepath=%2F&repo_id=3

      [Thu Dec 02 13:06:46 2010] [error] [client 127.0.0.1] Default exception handler: This file is bigger than the maximum size Debug: \n* line 104 of /repository/upload/lib.php: file_exception thrown\n* line 114 of /repository/filepicker.php: call to repository_upload->upload()\n, referer: http://localhost/moodle20/repository/filepicker.php?ctx_id=9095&itemid=928550035&env=filemanager&course=180&maxbytes=0&maxfiles=20&subdirs=1&sesskey=5DT9r8PyWS&action=list&draftpath=%2F&savepath=%2F&repo_id=3

        Gliffy Diagrams

          Activity

          Hide
          tlock Tim Lock added a comment -

          Errors generated because of repository_upload::upload() missing 2 parameters and depends on the maxbytes variable

          Show
          tlock Tim Lock added a comment - Errors generated because of repository_upload::upload() missing 2 parameters and depends on the maxbytes variable
          Hide
          tlock Tim Lock added a comment -

          Suggested fix

          Show
          tlock Tim Lock added a comment - Suggested fix

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: