mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #62355
[Bug 1928999] A patch has been submitted for review
Patch for "20.04_STABLE" branch: https://reviews.mahara.org/11797
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1928999
Title:
Error while deleting an External App if LTI plugin was never installed
Status in Mahara:
Fix Committed
Status in Mahara 20.04 series:
Fix Committed
Status in Mahara 20.10 series:
Fix Committed
Status in Mahara 21.04 series:
Fix Committed
Status in Mahara 21.10 series:
Fix Committed
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.php:853) Failed to get a recordset: postgres8 error: [-18: ERROR: relation "lti_assessment" does not exist
LINE 1: DELETE FROM "lti_assessment"
^] in EXECUTE("
DELETE FROM "lti_assessment"
WHERE oauthserver = ?
")Command was:
DELETE FROM "lti_assessment"
WHERE oauthserver = ?
and values was (0:1)
Call stack (most recent first):
log_message("Failed to get a recordset: postgres8 error: [-18: ...", 8, true, true) at /siteroot/htdocs/lib/errors.php:89
log_warn("Failed to get a recordset: postgres8 error: [-18: ...") at /siteroot/htdocs/lib/errors.php:853
SQLException->__construct("Failed to get a recordset: postgres8 error: [-18: ...") at /siteroot/htdocs/lib/dml.php:1156
delete_records_sql(" DELETE FROM "lti_...", array(size 1)) at /siteroot/htdocs/webservice/admin/oauthv1sregister.php:143
webservices_server_submit(object(Pieform), array(size 4)) at /siteroot/htdocs/lib/pieforms/pieform.php:568
Pieform->__construct(array(size 7)) at /siteroot/htdocs/lib/pieforms/pieform.php:168
Pieform::process(array(size 7)) at /siteroot/htdocs/lib/mahara.php:5499
pieform(array(size 7)) at /siteroot/htdocs/webservice/admin/oauthv1sregister.php:558
webservice_server_list_form(array(size 7), array(size 2)) at /siteroot/htdocs/webservice/admin/oauthv1sregister.php:68
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1928999/+subscriptions
References