Error deleting institution due to foreign key constraint with view table
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Cecilia Vela Gurovic | ||
19.04 |
Fix Released
|
High
|
Unassigned | ||
19.10 |
Fix Released
|
High
|
Cecilia Vela Gurovic | ||
20.04 |
Fix Released
|
High
|
Cecilia Vela Gurovic |
Bug Description
Mahara: 19.04.0
OS: Linux
DB: Postgres
Browser: FF
We have an institution which no longer has any users. When trying to delete it, it fails due to the foreign key constraint with the view table - which now has the institution field.
Call stack (most recent first):
log_
error(8, "Array to string conversion", "/var/www/
ADODB_
adodb_
ADODB_
ADOConnecti
ADOConnecti
delete_
delete_
Pieform-
Pieform:
pieform(
[WAR] 55 (lib/errors.
DETAIL: Key (wwwroot)=(https:/
There are records in the view table that have submitted pages to this institution. It's setup with XML-RPC with a Moodle.
summary: |
- Error Deleting Instution Due to Foreign Key Constraint with View Table + Error deleting institution due to foreign key constraint with view table |
Changed in mahara: | |
milestone: | 19.10.1 → 20.04.0 |
Changed in mahara: | |
milestone: | 20.04.0 → none |
Steps to reproduce:
1. Create an institution with xml-rpc integration with a Moodle. Allow submissions from Mahara to Moodle.
2. Add users to the new institution in Mahara.
3. In Moodle, create a course with an activity - Mahara submission. Make sure the Mahara user is enrolled in this course.
4. As a user of the institution, create a page in Mahara and submit the page to Moodle.
5. As an admin of Mahara, remove all users from the institution. This will enable the 'delete' button for the institution.
6. Try to delete the institution. You should receive the error above.