Forums | Mahara Community

Support /
Error when deleting groups


Sam Smucker's profile picture
Posts: 8

02 February 2019, 6:47

I'm running Mahara version 18.10, and when I try to delete a group, I get an error message saying "Mahara: Site unavailable. A nonrecoverable error occurred. This probably means you have encountered a bug in the system."

I checked the server logs and found this:

6612018 [01-Feb-2019 11:34:46 America/New_York] [WAR] 9c (artefact/cpds/lib.php:0) Declaration of ArtefactTypeActivity::bulk_delete($artefactids) should be compatible with ArtefactType::bulk_delete($artefactids, $log = false)
6612019 [01-Feb-2019 11:34:46 America/New_York] Call stack (most recent first):
6612020 [01-Feb-2019 11:34:46 America/New_York] * log_message(string(size 142), integer, true, true, string(size 37), integer) at /var/www/mahara/lib/errors.php:521
6612021 [01-Feb-2019 11:34:46 America/New_York] * error(integer, string(size 142), string(size 37), integer, array(size 9)) at /var/www/mahara/lib/mahara.php:1621
6612022 [01-Feb-2019 11:34:46 America/New_York] * require_once() at /var/www/mahara/lib/mahara.php:1621
6612023 [01-Feb-2019 11:34:46 America/New_York] * safe_require(string(size 8), string(size 4), string(size 7), string(size 12), false, null) at /var/www/mahara/lib/mahara.php:1653
6612024 [01-Feb-2019 11:34:46 America/New_York] * safe_require_plugin(string(size 8), string(size 4)) at /var/www/mahara/lib/web.php:3077
6612025 [01-Feb-2019 11:34:46 America/New_York] * right_nav() at /var/www/mahara/lib/web.php:745
6612026 [01-Feb-2019 11:34:46 America/New_York] * smarty() at /var/www/mahara/group/delete.php:46

 

It seems like something must be going wrong with smarty. Has anyone else had this problem, and does anyone know how to fix it?

Thanks,

Sam

Cecilia Vela's profile picture
Posts: 110

04 February 2019, 9:43

Hi Sam,

Thanks for adding the server logs to the message. It looks like the error you're getting might be related to the cpds plugin not being compatible with php7.

Mahara 18.10 supports php7 but the cpds plugin is not part of core. If you upgrade the plugin to the latest version this problem should be fixed.

Please find the latest plugin code here:

https://github.com/robertlyon777/mahara-artefact_cpds

I hope this helps,

Cecilia

Sam Smucker's profile picture
Posts: 8

05 February 2019, 2:43

Thanks for the help, Cecilia. I updated the plugin with the repository you linked to, but I'm still getting an error. The error looks different now, though; seems to be some sort of SQL problem. Here are the error logs:

 

6617168 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) Failed to get a recordset: postgres8 error: [-1: ERROR: column "aff1.artefact" must appear in the GROUP BY clause or be used in an aggregate function
6617169 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) LINE 2: SELECT aff1.*, a.artefacttype
6617170 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) ^] in adodb_throw(
6617171 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) SELECT aff1.*, a.artefacttype
6617172 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) FROM "artefact_file_files" aff1
6617173 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) JOIN "artefact" a ON aff1.artefact = a.id
6617174 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) WHERE artefact IN (5912,5913,5914,5881,5883,5880,5956)
6617175 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) GROUP BY fileid
6617176 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) HAVING COUNT(aff1.artefact) IN
6617177 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) (SELECT COUNT(aff2.artefact)
6617178 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) FROM "artefact_file_files" aff2
6617179 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) WHERE aff1.fileid = aff2.fileid), )Command was:
6617180 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) SELECT aff1.*, a.artefacttype
6617181 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) FROM "artefact_file_files" aff1
6617182 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) JOIN "artefact" a ON aff1.artefact = a.id
6617183 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) WHERE artefact IN (5912,5913,5914,5881,5883,5880,5956)
6617184 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) GROUP BY fileid
6617185 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) HAVING COUNT(aff1.artefact) IN
6617186 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) (SELECT COUNT(aff2.artefact)
6617187 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) FROM "artefact_file_files" aff2
6617188 [04-Feb-2019 08:36:10 America/New_York] [WAR] 9d (lib/dml.php:517) WHERE aff1.fileid = aff2.fileid)
6617189 [04-Feb-2019 08:36:10 America/New_York] Call stack (most recent first):
6617190 [04-Feb-2019 08:36:10 America/New_York] * get_recordset_sql(string(size 419), false, string(size 0), string(size 0)) at /var/www/mahara/lib/dml.php:697
6617191 [04-Feb-2019 08:36:10 America/New_York] * get_records_sql_assoc(string(size 419)) at /var/www/mahara/artefact/file/lib.php:1481
6617192 [04-Feb-2019 08:36:10 America/New_York] * ArtefactTypeFile::bulk_delete(array(size 7)) at /var/www/mahara/lib/mahara.php:1809
6617193 [04-Feb-2019 08:36:10 America/New_York] * call_static_method(string(size 16), string(size 11), array(size 7)) at /var/www/mahara/artefact/lib.php:769
6617194 [04-Feb-2019 08:36:10 America/New_York] * ArtefactType::delete_by_artefacttype(array(size 17)) at /var/www/mahara/lib/group.php:921
6617195 [04-Feb-2019 08:36:10 America/New_York] * group_delete(integer) at /var/www/mahara/group/delete.php:54
6617196 [04-Feb-2019 08:36:10 America/New_York] * deletegroup_submit(object(Pieform), array(size 2)) at /var/www/mahara/lib/pieforms/pieform.php:542
6617197 [04-Feb-2019 08:36:10 America/New_York] * Pieform->__construct(array(size 5)) at /var/www/mahara/lib/pieforms/pieform.php:164
6617198 [04-Feb-2019 08:36:10 America/New_York] * Pieform::process(array(size 5)) at /var/www/mahara/lib/mahara.php:5077
6617199 [04-Feb-2019 08:36:10 America/New_York] * pieform(array(size 5)) at /var/www/mahara/group/delete.php:41
Cecilia Vela's profile picture
Posts: 110

08 February 2019, 10:40

Hi Sam,

It looks like you could have the same problem as reported here

https://bugs.launchpad.net/mahara/+bug/1773247

In the comments of that bug report you will find a patch for it. You can try that fix and let us know how it goes.

Cheers,

Cecilia

4 results