Missing unique index in usr_custom_layout
Bug #1519780 reported by
Howard Miller
This bug report is a duplicate of:
Bug #1515929: Duplicate records in usr_custom_layout cause fatal crash when copying a collection.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
New
|
Undecided
|
Unassigned |
Bug Description
We had some issues with duplicate records in usr_custom_layout when creating a page from a template. In lib/view.php, function create_
$haslayout = get_record(
This failed because more than one record was returned. I have no idea what caused this but it would have been more robust if ('usr', 'layout') was defined as a unique index.
The problem occurred in 15.04 with MySQL. A quick glance suggests that nothing has changed in this area in 15.10.
To post a comment you must log in.
Hi Howard,
We actually just addressed this issue in Bug 1515929, which was included in the minor release 15.10.1 that came out three days ago.
I neglected to backport the fix to 15.04 and 1.10, but we probably should because they're probably affected as well. I'll update the bug to put them in the next minor release for those. In the meantime, you can try applying the patch for that issue manually.
Cheers,
Aaron