mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #61638
[Bug 1912705] Re: Task "export_process_queue" fails on cron run
Hi Zander,
Thank you for reporting this and also providing a possible solution. We
will add it to our code review system so the team can take a look. Can
you please provide your email address so we can attribute it correctly?
You can send it to kristina@xxxxxxxxxxxxxxx
Thank you
Kristina
** Changed in: mahara
Status: New => Confirmed
** Changed in: mahara
Importance: Undecided => High
** Also affects: mahara/20.10
Importance: Undecided
Status: New
** Also affects: mahara/21.04
Importance: High
Status: Confirmed
** Changed in: mahara/21.04
Milestone: None => 21.04.0
** Changed in: mahara/20.10
Milestone: None => 20.10.1
** Changed in: mahara/20.10
Importance: Undecided => High
** Changed in: mahara/20.10
Status: New => Confirmed
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1912705
Title:
Task "export_process_queue" fails on cron run
Status in Mahara:
Confirmed
Status in Mahara 20.10 series:
Confirmed
Status in Mahara 21.04 series:
Confirmed
Bug description:
When submissions are set to be archived before being released back to
the submitter, they are queued for export and an archived version is
created. This processed failed for us and we were given a hint in the
cron logs/output that the error was thrown at
`htdocs/artefact/comment/blocktype/comment/lib.php:111`.
Adding a `debug_print_backtrace()` to the file reveals more in the cron output:
```
[INF] 35 (lib/cron.php:190) Running core cron export_process_queue
#0 PluginBlocktypeComment::render_instance_export(BlockInstance Object ([BlockInstanceid] => 320133,[BlockInstanceblocktype] => comment,[BlockInst............[truncated]
, html) called at [<siteroot>/mahara/htdocs/lib/mahara.php:1818]
#1 call_static_method(PluginBlocktypeComment, render_instance_export, BlockInstance Object ([BlockInstanceid] => 320133,[BlockInstanceblocktype] => comment,[BlockInst............[truncated]
, html) called at [<siteroot>/mahara/htdocs/blocktype/lib.php:1351]
#2 BlockInstance->render_viewing(html, ) called at [<siteroot>/mahara/htdocs/lib/view.php:2290]
#3 View->build_column(3, 1, , html, ) called at [<siteroot>/mahara/htdocs/lib/view.php:2241]
#4 View->build_columns(3, , html, ) called at [<siteroot>/mahara/htdocs/lib/view.php:2182]
#5 View->build_rows(, html) called at [<siteroot>/mahara/htdocs/export/html/lib.php:479]
#6 PluginExportHtml->dump_view_export_data() called at [<siteroot>/mahara/htdocs/export/html/lib.php:242]
#7 PluginExportHtml->export() called at [<siteroot>/mahara/htdocs/export/lib.php:1015]
#8 PluginExportAll->export() called at [<siteroot>/mahara/htdocs/export/lib.php:704]
#9 export_process_queue() called at [<siteroot>/mahara/htdocs/lib/cron.php:198]
[WAR] 35 (lib/errors.php:536) [Error]: Call to a member function get() on null at <siteroot>/mahara/htdocs/artefact/comment/blocktype/comment/lib.php:112
Call stack (most recent first):
* exception(object(Error)) at Unknown:0
A nonrecoverable error occurred. This probably means you have encountered a bug in the system
```
We were able to fix it by explicitly declaring `global $exporter;` in
`htdocs/export/lib.php:602` at the very start of the
`export_process_queue` function - please refer to attached patch.
It also affects portfolio exports when the "Export to queue" settings
is enabled in Configure site > Site options > Account settings.
------------------------------
Application/System version(s):
Mahara
$config->version = 2020013013;
$config->series = '20.04';
$config->release = '20.04.2';
OS
Ubuntu 18.04.5 LTS
DB
MySQL 5.7
------------------------------
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1912705/+subscriptions
References