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

updating (overwriting) a file in private area which is linked multiple times to courses - error


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Component/s: Filepicker, Files API
    • Labels:
    • Affected Branches:


      step to reproduce:
      1) upload a file to your private file area (eg example.jpg)
      2) link it to a course
      2.1) go to a course and add new file
      2.2) in the content box click add, in file picker select private files, select the file, and choose "create an alias..." in the popup.
      2.3) save and return to course
      3) link it to another course (see step 2)
      4) go to my private files
      5) click add, upload a different file, save as the previous file name (eg. example.jpg), click overwrite.
      (minor bug here is that the thumbnail doesn't refresh in file list)
      6) click save changes

      Coding error detected, it must be fixed by a programmer: PHP catchable fatal error

      More information about this error

      Debug info: Argument 1 passed to file_storage::update_references_to_storedfile() must be an instance of stored_file, null given, called in /var/www/clients/client1/web6/web/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()

        Gliffy Diagrams


            Issue Links



                • Votes:
                  0 Vote for this issue
                  2 Start watching this issue


                  • Created: