Error Creating Custom Layout for Group Page

Bug #1288037 reported by Ghada El-Zoghbi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Triaged
High
Unassigned

Bug Description

Mahara: 1.8.2testing (2013101407)
OS: Linux
DB: PostGres 9.1
Browser: Firefox

In a brand new vanilla Mahara in install:
- Create 3 users (teacher1, teacher2, student1).
- Create a group (teachers) with users: teacher1 and teacher2.
- Log in as teacher1
- Create a page (Standard 1) under the group teachers
- Customise the layout (2 rows): row 1= 2 columns; row 2 = 5 columns.
- Click 'Create New Layout' button.

The following error is generated:

[WAR] 68 (lib/errors.php:736) Failed to get a recordset: postgres7 error: [-1: ERROR: null value in column "usr" violates not-null constraint] in adodb_throw(INSERT INTO "usr_custom_layout" ("layout") VALUES (?), Array)
Command was: INSERT INTO "usr_custom_layout" ("layout") VALUES (?) and values was (30)
Call stack (most recent first):

    log_message("Failed to get a recordset: postgres7 error: [-1: E...", 8, true, true) at /var/www/acttqi/mahara/htdocs/lib/errors.php:93
    log_warn("Failed to get a recordset: postgres7 error: [-1: E...") at /var/www/acttqi/mahara/htdocs/lib/errors.php:736
    SQLException->__construct("Failed to get a recordset: postgres7 error: [-1: E...") at /var/www/acttqi/mahara/htdocs/lib/dml.php:1053
    insert_record("usr_custom_layout", object(stdClass)) at /var/www/acttqi/mahara/htdocs/lib/view.php:1106
    View->addcustomlayout(array(size 4)) at /var/www/acttqi/mahara/htdocs/lib/view.php:1686
    View->process_changes() at /var/www/acttqi/mahara/htdocs/view/blocks.json.php:30

It appears that the owner is null.

There was a similar bug reported for Mahara 1.9 (bug #1266317). It may need to be applied to 1.8 also.

Revision history for this message
Ghada El-Zoghbi (ghada-z) wrote :
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: none → 1.8.2
status: New → Triaged
importance: Undecided → High
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Thanks Ghada!

I was able to replicate the problem, and cherry-picking the patches from Bug 1266317 fixed the problem. So, I'll mark this one as a duplicate and reopen the other bug.

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.