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

In correct error message while uploading files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.8
    • Filepicker
    • MOODLE_28_STABLE

      When someone uploads a file which is greater than the max upload limit set in php.ini, the user is shown a message saying "A required parameter(sesskey) was missing" instead of the actual factor.

      I noticed this error, while trying to restore a backup.

      The code responsible for the correct message is (repository_ajax.php)

      // If uploaded file is larger than post_max_size (php.ini) setting, $_POST content will be empty.
      if (empty($_POST) && !empty($action)) {
          $err->error = get_string('errorpostmaxsize', 'repository');
          die(json_encode($err));
      }
      

      Seems it is expecting $_GET['action'] to be set, which is not in this case.

      I have not tested in other places to be sure if the problem is localized to the restore page or not.

            Unassigned Unassigned
            ankit_frenz Ankit Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.