Export a page with comments raises an error

Bug #1595408 reported by Ghada El-Zoghbi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Ghada El-Zoghbi
16.04
Fix Released
Medium
Unassigned

Bug Description

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;">&quot;Missing argument 1 for ArtefactTypeComment::render...&quot;, 8, true, true, &quot;/var/www/mahara-site/artefact/comment/lib.php&quot;, 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, &quot;Missing argument 1 for ArtefactTypeComment::render...&quot;, &quot;/var/www/mahara-site/artefact/comment/lib.php&quot;, 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;">-&gt;</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;">-&gt;</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;">-&gt;</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;">-&gt;</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;">-&gt;</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.

Changed in mahara:
assignee: nobody → Ghada El-Zoghbi (ghada-z)
Revision history for this message
Ghada El-Zoghbi (ghada-z) wrote :

The same issue will arise for when exporting annotations with feedback.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/6613

Changed in mahara:
status: New → In Progress
milestone: none → 16.10.0
importance: Undecided → Medium
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/6613
Committed: https://git.mahara.org/mahara/mahara/commit/d1f63b580a2cf60377de127751042c1c52dd537f
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit d1f63b580a2cf60377de127751042c1c52dd537f
Author: Ghada El-Zoghbi <email address hidden>
Date: Thu Jun 23 16:35:24 2016 +1000

bug #1595408: When calling the render_self() functin ensure a parameter is passed.

behatnotneeded

Change-Id: I4972d8c4c225a6dfa442744c2fb02782ecebdbc5

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
Robert Lyon (robertl-9)
no longer affects: mahara/16.10
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "16.04_STABLE" branch: https://reviews.mahara.org/7803

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7803
Committed: https://git.mahara.org/mahara/mahara/commit/a6dbc2ae79f35835e1804e1a35b2b633353de5e2
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit a6dbc2ae79f35835e1804e1a35b2b633353de5e2
Author: Ghada El-Zoghbi <email address hidden>
Date: Thu Jun 23 16:35:24 2016 +1000

bug #1595408: When calling the render_self() functin ensure a parameter is passed.

behatnotneeded

Change-Id: I4972d8c4c225a6dfa442744c2fb02782ecebdbc5
(cherry picked from commit d1f63b580a2cf60377de127751042c1c52dd537f)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.