Public bug reported: 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. ** Affects: mahara Importance: Undecided Status: New -- 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: New 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 _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp