Fatal error trying to copy a page with "journal" block

Bug #1557239 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Aaron Wells

Bug Description

This is another bug caused by the performance patch that auto-loaded htdocs/artefact/lib.php into every single page load.

To replicate:

1. Create a journal with a journal entry.
2. Put a "journal" block in a page, with that journal selected.
3. Set the journal block's copying settings to "They get a copy of my journal"
4. Make the page copyable by other users and share it with other users
5. Log in as another user
6. Try to copy that page

Expected result: You get a copy of the page
Actual result: You see a fatal error.

( ! ) Fatal error: Call to undefined function artefact_get_descendants() in /home/aaronw/www/mahara/htdocs/blocktype/lib.php on line 1548
Call Stack
# Time Memory Function Location
1 0.0001 252504 {main}( ) ../copy.php:0
2 0.1121 11227224 copyview( ) ../copy.php:32
3 0.1284 11232920 View::create_from_template( ) ../view.php:6518
4 0.1751 11977176 View->copy_contents( ) ../view.php:400
5 0.1820 12520360 BlockInstance->copy( ) ../view.php:5441

Tags: regression
Aaron Wells (u-aaronw)
tags: added: regression
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/6140

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

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

commit c59f90026b3fa586b37b95c0ef4a62e92b7ee6a7
Author: Aaron Wells <email address hidden>
Date: Tue Mar 15 14:15:42 2016 +1300

Include artefact/lib.php when copying a page

Bug 1557239

behatnotneeded - existing tests should suffice

Change-Id: I782082ccb0a097f600ac66208a9953d3b448a035

no longer affects: mahara/16.04
Changed in mahara:
status: Fix Committed → Fix Released
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.