-
Bug
-
Resolution: Fixed
-
Blocker
-
2.3
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE
-
wip-
MDL-33399-m23 -
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:
- Create a new site
- Enable the googledocs and picasa repository plugins.
- Enable the googledocs and picasa portfolio plugins.
- Create a new user
- Create a course and enrol your new user
- Create a forum within the course
- 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.
- View the post
- Click the export to portfolio button for the post.
- 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