Problems copying group collections to and from groups

Bug #1622383 reported by Robert Lyon on 2016-09-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Robert Lyon
16.04
High
Unassigned
16.10
High
Robert Lyon

Bug Description

Issues found:

PHP Fatal error: Call to undefined function artefact_get_references_in_html() htdocs/lib/view.php on line 5398

When user has a page in the collection has an embedded image in description and that collection is trying to be copied into a group.

Needs a require once to get the artefact library included

-----------------------

PHP Fatal error: Call to undefined function group_current_group() htdocs/collection/index.php on line 35 and on htdocs/collection/edit.php on line 53

When trying to create/edit a collection in a group

Needs a require once to get the group library included

-----------------------

PHP Fatal error: Call to undefined function group_homepage_url() htdocs/lib/view.php on line 6123

When trying to edit the access for the group collection

Needs a require once to get the group library included

Robert Lyon (robertl-9) wrote :

This problem stems from not having all libraries included by default on all pages

So we need to require them where actually needed.

Robert Lyon (robertl-9) wrote :

To replicate the first issue:

On a new site

1) Create some pages for a user and make sure you add some information into description field for the page that includes embedding an image via tinymce image button.

2) Add the pages to a collection

3) Create a group

4) Share the collection to the group and make the collection copyable

5) Go into the group and go to collection and try to copy the user's collection into the group

You should get a blank page and the PHP Fatal error: Call to undefined function artefact_get_references_in_html() in the error log.

Robert Lyon (robertl-9) on 2016-09-11
no longer affects: mahara/15.04
no longer affects: mahara/15.10

Reviewed: https://reviews.mahara.org/6953
Committed: https://git.mahara.org/mahara/mahara/commit/ae69c7dad1b277e7d12109e5ed08d0c7a0e3ecea
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit ae69c7dad1b277e7d12109e5ed08d0c7a0e3ecea
Author: Robert Lyon <email address hidden>
Date: Mon Sep 12 08:32:52 2016 +1200

Bug 1622383: Copying collections to/from groups causes fatal error

Because certain libraries are not loaded under some circumstances

When copying a collection containing pages with descriptions
containing embedded images to/from a group/user.

behatnotneeded

Change-Id: I1a5f4e3d2c26736b6e087cf07daa5fd44f84441f
Signed-off-by: Robert Lyon <email address hidden>

Reviewed: https://reviews.mahara.org/7049
Committed: https://git.mahara.org/mahara/mahara/commit/095b5332c1a33036bbf1e49237ec2d8b495737d3
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit 095b5332c1a33036bbf1e49237ec2d8b495737d3
Author: Robert Lyon <email address hidden>
Date: Mon Sep 12 08:32:52 2016 +1200

Bug 1622383: Copying collections to/from groups causes fatal error

Because certain libraries are not loaded under some circumstances

When copying a collection containing pages with descriptions
containing embedded images to/from a group/user.

behatnotneeded

Change-Id: I1a5f4e3d2c26736b6e087cf07daa5fd44f84441f
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit ae69c7dad1b277e7d12109e5ed08d0c7a0e3ecea)

Niranjan (niranjan528) wrote :

Tested this on 16.10 ff browser.

fatal error is no more an issue( got fixed now), but due to this fix the appearance and alignment of copy collection is totally changed ( see screenshot).

Robert Lyon (robertl-9) wrote :

That layout button change is actually in 16.04 and it is as expected - we used to do the buttons differently then

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

commit 49ecee2a0a5abeb3e3a41a88de3ce44e801e26df
Author: Robert Lyon <email address hidden>
Date: Mon Sep 12 08:32:52 2016 +1200

Bug 1622383: Copying collections to/from groups causes fatal error

Because certain libraries are not loaded under some circumstances

When copying a collection containing pages with descriptions
containing embedded images to/from a group/user.

behatnotneeded

Change-Id: I1a5f4e3d2c26736b6e087cf07daa5fd44f84441f
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit ae69c7dad1b277e7d12109e5ed08d0c7a0e3ecea)
(cherry picked from commit 095b5332c1a33036bbf1e49237ec2d8b495737d3)

Robert Lyon (robertl-9) on 2016-10-21
Changed in mahara:
milestone: 16.10.0 → none
Robert Lyon (robertl-9) on 2016-10-25
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers