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

Viewing course files throwing exception

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Files API
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      I was working with Mary Cooch and originally thought this might be related to having installed the Flickr repository since after enabling the Flickr plugin and going to browse a course's files (including site files) I receive:

      Coding error detected, it must be fixed by a programmer: Url parameters can not have numeric keys!

      Coding error detected, it must be fixed by a programmer: Unrecognied URL scheme. Please check the formatting of the URL passed to this function. Absolute URLs are the preferred scheme.

      I did a var_dump($params) which yielded:

      array(5)

      { [0]=> string(12) "contextid=14" [1]=> string(23) "filearea=course_content" [2]=> string(8) "itemid=0" [3]=> string(12) "filepath=%2F" [4]=> string(9) "filename=" }

      var_dump($key) produces:

      int(0)

      I am not sure if it is in the call to moodle_url in /files/index.php around line 49:

      redirect(new moodle_url('index.php', array('contextid' => $context->id, 'itemid'=> 0, 'filearea' => 'course_content')));

      I am not sure what is happening but something is getting passed incorrectly such that $params is seeing the index as an int.

      Peace - Anthony

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              aborrow Anthony Borrow
              Tester:
              Nobody
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: