Mahara: 16.04.1
DB: Postgres
Browser: Firefox
OS: Linux
When exporting a page with comments, the following error occurs:
<div class="backtrace">[WAR] 2b (artefact/comment/lib.php:899) Missing argument 1 for ArtefactTypeComment::render_self(), called in /var/www/mahara-site/artefact/comment/export/leap/lib.php on line 66 and defined</div>
<div class="backtrace"><strong>Call stack (most recent first):</strong> <ul><li><span style="color:#933;"></span><span style="color:#060;"></span><span style="color:#339;">log_message</span><span style="color:#060;">(</span><span style="color:#f00;">"Missing argument 1 for ArtefactTypeComment::render...", 8, true, true, "/var/www/mahara-site/artefact/comment/lib.php", 899</span><span style="color:#060;">)</span> at <strong>/var/www/mahara-site/lib/errors.php:489</strong></li><li><span style="color:#933;"></span><span style="color:#060;"></span><span style="color:#339;">error</span><span style="color:#060;">(</span><span style="color:#f00;">2, "Missing argument 1 for ArtefactTypeComment::render...", "/var/www/mahara-site/artefact/comment/lib.php", 899, array(size 0)</span><span style="color:#060;">)</span> at <strong>/var/www/mahara-site/artefact/comment/lib.php:899</strong></li><li><span style="color:#933;">ArtefactTypeComment</span><span style="color:#060;">-></span><span style="color:#339;">render_self</span><span style="color:#060;">(</span><span style="color:#f00;"></span><span style="color:#060;">)</span> at <strong>/var/www/mahara-site/artefact/comment/export/leap/lib.php:66</strong></li><li><span style="color:#933;">LeapExportElementComment</span><span style="color:#060;">-></span><span style="color:#339;">get_content</span><span style="color:#060;">(</span><span style="color:#f00;"></span><span style="color:#060;">)</span> at <strong>/var/www/mahara-site/export/leap/lib.php:742</strong></li><li><span style="color:#933;">LeapExportElement</span><span style="color:#060;">-></span><span style="color:#339;">assign_smarty_vars</span><span style="color:#060;">(</span><span style="color:#f00;"></span><span style="color:#060;">)</span> at <strong>/var/www/mahara-site/export/leap/lib.php:555</strong></li><li><span style="color:#933;">PluginExportLeap</span><span style="color:#060;">-></span><span style="color:#339;">export_artefacts</span><span style="color:#060;">(</span><span style="color:#f00;"></span><span style="color:#060;">)</span> at <strong>/var/www/mahara-site/export/leap/lib.php:136</strong></li><li><span style="color:#933;">PluginExportLeap</span><span style="color:#060;">-></span><span style="color:#339;">export</span><span style="color:#060;">(</span><span style="color:#f00;"></span><span style="color:#060;">)</span> at <strong>/var/www/mahara-site/export/download.php:98</strong></li></div>
Digging around. It's due to the call to the render_self() not including a variable - i.e. array() - when nothing is to be passed to the function.
The same issue will arise for when exporting annotations with feedback.