Warning produced when trying to copy a group page

Bug #1870989 reported by Lisa Seeto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Lisa Seeto

Bug Description

A warning message is produced when trying to copy a group page from the "Administer Groups" page.

[WAR] 84 (lib/adodb/adodb-exceptions.inc.php:45) Array to string conversion
Call stack (most recent first):

    log_message("Array to string conversion", 8, true, true, "/home/lisaseeto/code/mahara/htdocs/lib/adodb/adodb...", 45) at /home/lisaseeto/code/mahara/htdocs/lib/errors.php:521
    error(8, "Array to string conversion", "/home/lisaseeto/code/mahara/htdocs/lib/adodb/adodb...", 45, array(size 7)) at /home/lisaseeto/code/mahara/htdocs/lib/adodb/adodb-exceptions.inc.php:45
    ADODB_Exception->__construct("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "block_instance"...", "DELETE FROM "block_instance" WHERE "view" = ? ", array(size 1), object(ADODB_postgres8)) at /home/lisaseeto/code/mahara/htdocs/lib/adodb/adodb-exceptions.inc.php:80
    adodb_throw("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "block_instance"...", "DELETE FROM "block_instance" WHERE "view" = ? ", array(size 1), object(ADODB_postgres8)) at /home/lisaseeto/code/mahara/htdocs/lib/adodb/adodb.inc.php:310
    ADODB_TransMonitor("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "block_instance"...", "DELETE FROM "block_instance" WHERE "view" = ? ", array(size 1), object(ADODB_postgres8)) at /home/lisaseeto/code/mahara/htdocs/lib/adodb/adodb.inc.php:1281
    ADOConnection->_Execute("DELETE FROM "block_instance" WHERE "view" = ? ", array(size 1)) at /home/lisaseeto/code/mahara/htdocs/lib/adodb/adodb.inc.php:1241
    ADOConnection->Execute("DELETE FROM "block_instance" WHERE "view" = ? ", array(size 1)) at /home/lisaseeto/code/mahara/htdocs/lib/dml.php:1041
    delete_records("block_instance", "view", "54") at /home/lisaseeto/code/mahara/htdocs/lib/group.php:3121
    group_copy(1, "adminlist") at /home/lisaseeto/code/mahara/htdocs/group/copy.php:42

[WAR] 84 (lib/errors.php:859) Failed to get a recordset: postgres8 error: [-1: ERROR: update or delete on table "block_instance" violates foreign key constraint "blocinstdime_blo_fk" on table "block_instance_dimension"
DETAIL: Key (id)=(219) is still referenced from table "block_instance_dimension".] in adodb_throw(DELETE FROM "block_instance" WHERE "view" = ? , Array)Command was: DELETE FROM "block_instance" WHERE "view" = ? and values was (0:54)

Steps:
Have a site with at least one group. Log in as admin
1/ From main menu select Groups -> Administer Groups
2/ In the list select "Copy"
Expected results:
You are able to continue the copying a page process
Actual results:
A warning message is produced (see attachment)

Revision history for this message
Lisa Seeto (lisaseeto) wrote :
Lisa Seeto (lisaseeto)
Changed in mahara:
assignee: nobody → Lisa Seeto (lisaseeto)
status: New → In Progress
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/10875

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

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

commit 81b56b7bc43e49c14072fc6548d1b5fc0fc0d8b5
Author: Lisa Seeto <email address hidden>
Date: Tue Apr 14 14:08:23 2020 +1200

Bug 1870989: Warning produced when trying to copy a group page

- altered sql query to include new layout information
- altered the way the new blocks are saved

Change-Id: I8b2b839e6f81cf894940020e6b8a0573e1246059
Signed-off-by: Lisa Seeto <email address hidden>

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

Patch for "20.04_STABLE" branch: https://reviews.mahara.org/10897

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

Reviewed: https://reviews.mahara.org/10897
Committed: https://git.mahara.org/mahara/mahara/commit/a4ea6b90041f833eacb5056804af06371e6191b9
Submitter: Robert Lyon (<email address hidden>)
Branch: 20.04_STABLE

commit a4ea6b90041f833eacb5056804af06371e6191b9
Author: Lisa Seeto <email address hidden>
Date: Tue Apr 14 14:08:23 2020 +1200

Bug 1870989: Warning produced when trying to copy a group page

- altered sql query to include new layout information
- altered the way the new blocks are saved

Change-Id: I8b2b839e6f81cf894940020e6b8a0573e1246059
Signed-off-by: Lisa Seeto <email address hidden>
(cherry picked from commit 81b56b7bc43e49c14072fc6548d1b5fc0fc0d8b5)

Robert Lyon (robertl-9)
Changed in mahara:
milestone: none → 20.04.0
importance: Undecided → High
status: In Progress → Fix Committed
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.