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

Portfolio export corrupted at same point leading to fatal error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.3
    • 2.3
    • Portfolio
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • wip-MDL-33399-m23
    • Hide

      1. Log in as admin
      2. Enable the googledocs portfolio
      3. Create a new course + forum
      4. Post in the forum, just text no files.
      5. View the post.
      6. You should see a link "Export to portfolio" beside edit|delete|reply. Click that
      7. If you get a strict warning ignore that and click continue.
      8. You should not get the error noted in the description.. but likely you will get an error.

      Show
      1. Log in as admin 2. Enable the googledocs portfolio 3. Create a new course + forum 4. Post in the forum, just text no files. 5. View the post. 6. You should see a link "Export to portfolio" beside edit|delete|reply. Click that 7. If you get a strict warning ignore that and click continue. 8. You should not get the error noted in the description.. but likely you will get an error.

      Here's a fun one, I got the following error on a freshly installed site.

      Debug info:
      Error code: dmlreadexception
      Stack trace:
      line 982 of /lib/portfoliolib.php: portfolio_export_exception thrown
      line 247 of /lib/portfolio/exporter.php: call to portfolio_export_rethrow_exception()
      line 233 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage()
      line 233 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage()
      line 233 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage()
      line 233 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage()
      line 267 of /portfolio/add.php: call to portfolio_exporter->process_stage()
      Output buffer:
      A third party exception was thrown during portfolio export (dml_read_exception). Caught and rethrown but this should really be fixed
      line 245 of /lib/portfolio/exporter.php: call to debugging()
      line 233 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage()
      line 233 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage()
      line 233 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage()
      line 233 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage()
      line 267 of /portfolio/add.php: call to portfolio_exporter->process_stage()

      exception 'dml_read_exception' with message 'Error reading from database' in /var/www/integration/lib/dml/moodle_database.php:413
      Stack trace:
      #0 /var/www/integration/lib/dml/pgsql_native_moodle_database.php(243): moodle_database->query_end(false)
      #1 /var/www/integration/lib/dml/pgsql_native_moodle_database.php(703): pgsql_native_moodle_database->query_end(false)
      #2 /var/www/integration/lib/filestorage/file_storage.php(421): pgsql_native_moodle_database->get_records_sql('SELECT f.id AS ...', Array)
      #3 /var/www/integration/lib/portfolio/exporter.php(812): file_storage->get_area_files('1', 'portfolio', 'exporter', 2, '', false)
      #4 /var/www/integration/portfolio/googledocs/lib.php(52): portfolio_exporter->get_tempfiles()
      #5 /var/www/integration/lib/portfolio/exporter.php(502): portfolio_plugin_googledocs->send_package()
      #6 /var/www/integration/lib/portfolio/exporter.php(227): portfolio_exporter->process_stage_send()
      #7 /var/www/integration/lib/portfolio/exporter.php(233): portfolio_exporter->process_stage(5)
      #8 /var/www/integration/lib/portfolio/exporter.php(233): portfolio_exporter->process_stage(4)
      #9 /var/www/integration/lib/portfolio/exporter.php(233): portfolio_exporter->process_stage(3)
      #10 /var/www/integration/lib/portfolio/exporter.php(233): portfolio_exporter->process_stage(2)
      #11 /var/www/integration/portfolio/add.php(267): portfolio_exporter->process_stage(1, false)
      #12 {main}

      line 246 of /lib/portfolio/exporter.php: call to debugging()
      line 233 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage()
      line 233 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage()
      line 233 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage()
      line 233 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage()
      line 267 of /portfolio/add.php: call to portfolio_exporter->process_stage()

      This is what I did (and hopefully can be used to reproduce:

      1. Create a new site
      2. Enable the googledocs and picasa repository plugins.
      3. Enable the googledocs and picasa portfolio plugins.
      4. Create a new user
      5. Create a course and enrol your new user
      6. Create a forum within the course
      7. Make a post within the forum (still as admin) that does the following:
        • Uses an image within the main text from picasa
        • Attach a document from the googledocs repo.
        • Click save to make the post.
      8. View the post
      9. Click the export to portfolio button for the post.
      10. Boom fatal error.

      At first I managed to produce a bug in the file picker and thought that may be the cause. But now I have reproduced it without that.
      So clearly an easy to reproduce bug.

      Cheers
      Sam

            samhemelryk Sam Hemelryk
            samhemelryk Sam Hemelryk
            Dan Poltawski Dan Poltawski
            Adrian Greeve Adrian Greeve
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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