Error while deleting an External App if LTI plugin was never installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Ghada El-Zoghbi | ||
20.04 |
Fix Released
|
High
|
Unassigned | ||
20.10 |
Fix Released
|
High
|
Unassigned | ||
21.04 |
Fix Released
|
High
|
Unassigned |
Bug Description
Mahara: 20.10.1
OS: Linux 18.04
DB: Postgres
Browser: any
An error is generated when a user deletes an External App if the LTI plugin was never installed on the site.
To replicate:
- Create a new Mahara instance
- DO NOT enable the LTI plugin
- Add an External App ( Site admin > Web services > External apps )
- Delete the External App - confirm yes,you want to delete.
- The following error is generated:
[WAR] bd (lib/errors.
LINE 1: DELETE FROM "lti_assessment"
Call stack (most recent first):
log_message("Failed to get a recordset: postgres8 error: [-18: ...", 8, true, true) at /siteroot/
log_warn("Failed to get a recordset: postgres8 error: [-18: ...") at /siteroot/
SQLException-
delete_
webservices_
Pieform-
Pieform:
pieform(array(size 7)) at /siteroot/
webservice_
The reason is because the table from the LTI plugin was never installed. A check that the table exists needs to be applied first. Please note - check not that the plugin is enabled but if the table exists.
A situation can arise where the plugin was installed, some data is in the table, then the plugin is disabled. Disabling a plugin does not remove its existing data/tables.
Changed in mahara: | |
assignee: | nobody → Ghada El-Zoghbi (ghada-z) |
no longer affects: | mahara/21.10 |
Patch for "master" branch: https:/ /reviews. mahara. org/11794