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

Shortcut/alias not working for Private file repo

XMLWordPrintable

    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • Hide
      1. Login as teacher
      2. Go to "Manage private files"
      3. Upload text file called test.txt and click save changes
      4. Go to a course and add a file resource using the uploaded text file as a shortcut/alias
      5. Login as student (in another browser for convenience) and try to download/view file from course
      6. Make sure this is a correct file
      7. Work again as teacher
      8. Edit text file and then go to "Manage private files" again
      9. Upload edited text file and choose "Overwrite" when the prompt appears after file upload
      10. Then click save changes
      11. Verify error is not thrown
      12. As a student try to download/view file from course
      13. Make sure this is a correct (new) file
      Show
      Login as teacher Go to "Manage private files" Upload text file called test.txt and click save changes Go to a course and add a file resource using the uploaded text file as a shortcut/alias Login as student (in another browser for convenience) and try to download/view file from course Make sure this is a correct file Work again as teacher Edit text file and then go to "Manage private files" again Upload edited text file and choose "Overwrite" when the prompt appears after file upload Then click save changes Verify error is not thrown As a student try to download/view file from course Make sure this is a correct (new) file

      Steps to reproduce problem:

      1. Go to QA site: http://qa.moodle.net/
      2. Login as teacher
      3. Go to "Manage private files"
      4. Upload text file called test.txt and click save changes
      5. Go to a course and add a file resource using the uploaded text file as a shortcut/alias
      6. Edit text file and then go to "Manage private files" again
      7. Upload edited text file and choose "Overwrite" when the prompt appears after file upload
      8. Then click save changes
      9. Following error message appears:

      Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
       
      Debug info: Argument 1 passed to file_storage::update_references_to_storedfile() must be an instance of stored_file, null given, called in /html/lib/filelib.php on line 835 and defined
      Error code: codingerror
      Stack trace:
      line 397 of /lib/setuplib.php: coding_exception thrown
      line 1823 of /lib/filestorage/file_storage.php: call to default_error_handler()
      line 835 of /lib/filelib.php: call to file_storage->update_references_to_storedfile()
      line 291 of /lib/filelib.php: call to file_save_draft_area_files()
      line 64 of /user/files.php: call to file_postupdate_standard_filemanager()
      Output buffer: <br /> <b>Notice</b>: Undefined variable: this in <b>/html/lib/filelib.php</b> on line <b>835</b><br />

      1. Also, another error message that appears is that in the function update_references_to_storedfile in lib/filestorage/file_storage is missing the reference to a global $DB object.

            marina Marina Glancy
            rex Rex Lorenzo
            Marina Glancy Marina Glancy
            Dan Poltawski Dan Poltawski
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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