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

Duplicate files in forum discussion break portfolio export

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • None
    • 2.0
    • Portfolio
    • None
    • MOODLE_20_STABLE

      Steps to reproduce:
      1/ Create a forum discussion with an attachment
      2/ Reply to that forum discussion and attach the same file
      3/ Export the whole discussion to portfolio

      Bang:
      ERROR: duplicate key violates unique constraint "mdl_file_pat_uix"

      INSERT INTO mdl_files (contenthash,pathnamehash,contextid,filearea,itemid,filepath,filename,userid,filesize,mimetype,status,timecreated,timemodified,id) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)
      [array ( 'contenthash' => '80d44009165d6e99e855a127f3626e9ceb385e3e', 'pathnamehash' => '9a7e5e6202468945bb1fe9e13a6bc5788ecc9d25', 'contextid' => '1', 'filearea' => 'portfolio_exporter', 'itemid' => 91, 'filepath' => '/', 'filename' => 'Dan Rosie.jpg', 'userid' => '3', 'filesize' => '372695', 'mimetype' => 'image/jpeg', 'status' => '0', 'timecreated' => '1220877698', 'timemodified' => '1220877698', 'id' => 211, )]
      line 253 of lib/dml/moodle_database.php: call to debugging()
      line 210 of lib/dml/postgres7_adodb_moodle_database.php: call to moodle_database->report_error()
      line 288 of lib/dml/postgres7_adodb_moodle_database.php: call to postgres7_adodb_moodle_database->insert_record_raw()
      line 418 of lib/file/file_storage.php: call to postgres7_adodb_moodle_database->insert_record()
      line 2440 of lib/portfoliolib.php: call to file_storage->create_file_from_storedfile()
      line 7295 of mod/forum/lib.php: call to portfolio_exporter->copy_existing_file()
      line 7273 of mod/forum/lib.php: call to forum_portfolio_caller->copy_files()
      line 2263 of lib/portfoliolib.php: call to forum_portfolio_caller->prepare_package()
      line 2047 of lib/portfoliolib.php: call to portfolio_exporter->process_stage_package()
      line 2053 of lib/portfoliolib.php: call to portfolio_exporter->process_stage()
      line 2053 of lib/portfoliolib.php: call to portfolio_exporter->process_stage()
      line 2053 of lib/portfoliolib.php: call to portfolio_exporter->process_stage()
      line 153 of portfolio/add.php: call to portfolio_exporter->process_stage()

            mjollnir Penny Leach
            poltawski Dan Poltawski
            Nobody Nobody
            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.