Forums | Mahara Community

Support /
Error "A nonrecoverable error occurred"


Alan Cook's profile picture
Posts: 3

21 March 2019, 2:25

I have Mahara 17.04.02 installed.

I have not upgraded to 18.x since I saw error messages and decided to revert back to 17.x until I could migrate the data to another installation.  I exported all the portfolios as Leap and HTML, but have not been able to import them into an 18.x install (acts like it is trying to import, but nothing is loaded...haven't checked the error logs on the import yet).

In the meantime (months), a few users have been in making some changes to their portfolios and all of the sudden they (and me, admin) are seeing a message "Site unavailable A nonrecoverable error occurred. This probably means you have encountered a bug in the system" although I have not tried to do any updates or changes.  This was just out of the blue.

I can log in as admin or a user and maneuver around the menus, but cannot see any portfolio pages or export without getting an error:

(Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows = '1'' at line 4] in EXECUTE(" SELECT * 

Some error I see in the logs, include:

In the 'error.log' inside the /view/ folder: 

[26-Feb-2019 17:53:31 UTC]
[26-Feb-2019 17:53:31 UTC] [WAR] 36 (artefact/file/lib.php:665) Undefined property: stdClass::$sum
[26-Feb-2019 17:53:31 UTC] Call stack (most recent first):
[26-Feb-2019 17:53:31 UTC] * log_message(string(size 34), integer, true, true, string(size 55), integer) at /home/planetco/public_html/mahara/lib/errors.php:521
[26-Feb-2019 17:53:31 UTC] * error(integer, string(size 34), string(size 55), integer, array(size 17)) at /home/planetco/public_html/mahara/artefact/file/lib.php:665
[26-Feb-2019 17:53:31 UTC] * ArtefactTypeFileBase::get_my_files_data(integer, string(size 1), null, null, array(size 2)) at /home/planetco/public_html/mahara/lib/form/elements/filebrowser.php:159
[26-Feb-2019 17:53:31 UTC] * pieform_element_filebrowser(object(Pieform), array(size 17)) at /home/planetco/public_html/mahara/lib/pieforms/pieform.php:1503
[26-Feb-2019 17:53:31 UTC] * Pieform->build_element_html(array(size 17)) at /home/planetco/public_html/mahara/lib/pieforms/pieform.php:721
[26-Feb-2019 17:53:31 UTC] * Pieform->build() at /home/planetco/public_html/mahara/lib/pieforms/pieform.php:976
[26-Feb-2019 17:53:31 UTC] * Pieform->json_reply(integer, array(size 8)) at /home/planetco/public_html/mahara/lib/pieforms/pieform.php:943
[26-Feb-2019 17:53:31 UTC] * Pieform->reply(integer, array(size 7)) at /home/planetco/public_html/mahara/blocktype/lib.php:851
[26-Feb-2019 17:53:31 UTC] * BlockInstance->instance_config_store(object(Pieform), array(size 3)) at /home/planetco/public_html/mahara/lib/pieforms/pieform.php:543
[26-Feb-2019 17:53:31 UTC] * Pieform->__construct(array(size 15)) at /home/planetco/public_html/mahara/lib/mahara.php:4828
[26-Feb-2019 17:53:31 UTC] * pieform_instance(array(size 15)) at /home/planetco/public_html/mahara/blocktype/lib.php:1219
[26-Feb-2019 17:53:31 UTC] * BlockInstance->build_configure_form(false) at /home/planetco/public_html/mahara/view/blocks.php:72
[26-Feb-2019 17:53:31 UTC]
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/errors.php:859) Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows = '1'' at line 4] in EXECUTE("
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/errors.php:859) SELECT * FROM "mh_view_layout" vl
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/errors.php:859) JOIN "mh_usr_custom_layout" ucl
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/errors.php:859) ON ((vl.id = ucl.layout) AND (ucl.usr = 0 OR ucl.usr = '5'))
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/errors.php:859) WHERE rows = '1'")Command was:
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/errors.php:859) SELECT * FROM "mh_view_layout" vl
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/errors.php:859) JOIN "mh_usr_custom_layout" ucl
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/errors.php:859) ON ((vl.id = ucl.layout) AND (ucl.usr = 0 OR ucl.usr = ?))
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/errors.php:859) WHERE rows = ? and values was (0:5,1:1)
[19-Mar-2019 14:26:25 UTC] Call stack (most recent first):
[19-Mar-2019 14:26:25 UTC] * log_message(string(size 672), integer, true, true) at /home/planetco/public_html/mahara/lib/errors.php:95
[19-Mar-2019 14:26:25 UTC] * log_warn(string(size 672)) at /home/planetco/public_html/mahara/lib/errors.php:859
[19-Mar-2019 14:26:25 UTC] * SQLException->__construct(string(size 672)) at /home/planetco/public_html/mahara/lib/dml.php:517
[19-Mar-2019 14:26:25 UTC] * get_recordset_sql(string(size 204), array(size 2), string(size 0), string(size 0)) at /home/planetco/public_html/mahara/lib/dml.php:683
[19-Mar-2019 14:26:25 UTC] * get_records_sql_assoc(string(size 198), array(size 2)) at /home/planetco/public_html/mahara/lib/view.php:2935
[19-Mar-2019 14:26:25 UTC] * View->get_layout() at /home/planetco/public_html/mahara/lib/view.php:1944
[19-Mar-2019 14:26:25 UTC] * View->build_column_datastructure(integer, false) at /home/planetco/public_html/mahara/lib/view.php:1973
[19-Mar-2019 14:26:25 UTC] * View->get_row_datastructure() at /home/planetco/public_html/mahara/lib/view.php:2297
[19-Mar-2019 14:26:25 UTC] * View->get_all_blocktype_javascript() at /home/planetco/public_html/mahara/view/view.php:217
[19-Mar-2019 14:26:25 UTC]
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/dml.php:517) Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows = '1'' at line 4] in EXECUTE("
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/dml.php:517) SELECT * FROM "mh_view_layout" vl
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/dml.php:517) JOIN "mh_usr_custom_layout" ucl
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/dml.php:517) ON ((vl.id = ucl.layout) AND (ucl.usr = 0 OR ucl.usr = '5'))
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/dml.php:517) WHERE rows = '1'")Command was:
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/dml.php:517) SELECT * FROM "mh_view_layout" vl
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/dml.php:517) JOIN "mh_usr_custom_layout" ucl
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/dml.php:517) ON ((vl.id = ucl.layout) AND (ucl.usr = 0 OR ucl.usr = ?))
[19-Mar-2019 14:26:25 UTC] [WAR] b8 (lib/dml.php:517) WHERE rows = ? and values was (0:5,1:1)
[19-Mar-2019 14:26:25 UTC] Call stack (most recent first):
[19-Mar-2019 14:26:25 UTC] * get_recordset_sql(string(size 204), array(size 2), string(size 0), string(size 0)) at /home/planetco/public_html/mahara/lib/dml.php:683
[19-Mar-2019 14:26:25 UTC] * get_records_sql_assoc(string(size 198), array(size 2)) at /home/planetco/public_html/mahara/lib/view.php:2935
[19-Mar-2019 14:26:25 UTC] * View->get_layout() at /home/planetco/public_html/mahara/lib/view.php:1944
[19-Mar-2019 14:26:25 UTC] * View->build_column_datastructure(integer, false) at /home/planetco/public_html/mahara/lib/view.php:1973
[19-Mar-2019 14:26:25 UTC] * View->get_row_datastructure() at /home/planetco/public_html/mahara/lib/view.php:2297
[19-Mar-2019 14:26:25 UTC] * View->get_all_blocktype_javascript() at /home/planetco/public_html/mahara/view/view.php:217

Note that the Undefined property: stdClass::$sum error at the start of the above appears to be something that has been happening many times...once back in February and then several times on March 19th...but before this too back almost a year to where the log begins (this error also appears a few times during September in the error.log within the /json directory).

...and then inside the lib.php file, I see on line 665:

$item->foldersize = ArtefactTypeFile::short_size($foldersize->sum, true);

 

I also see this in the error.log that is inside the /mahara folder:

 

[19-Mar-2019 17:29:53 UTC]
[19-Mar-2019 20:57:35 UTC] PHP Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /home/planetco/public_html/mahara/lib/htmlpurifier/HTMLPurifier.autoload.php on line 17
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/errors.php:859) Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows = '1'' at line 4] in EXECUTE("
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/errors.php:859) SELECT * FROM "mh_view_layout" vl
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/errors.php:859) JOIN "mh_usr_custom_layout" ucl
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/errors.php:859) ON ((vl.id = ucl.layout) AND (ucl.usr = 0 OR ucl.usr = '5'))
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/errors.php:859) WHERE rows = '1'")Command was:
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/errors.php:859) SELECT * FROM "mh_view_layout" vl
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/errors.php:859) JOIN "mh_usr_custom_layout" ucl
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/errors.php:859) ON ((vl.id = ucl.layout) AND (ucl.usr = 0 OR ucl.usr = ?))
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/errors.php:859) WHERE rows = ? and values was (0:5,1:1)
[19-Mar-2019 20:57:40 UTC] Call stack (most recent first):
[19-Mar-2019 20:57:40 UTC] * log_message(string(size 672), integer, true, true) at /home/planetco/public_html/mahara/lib/errors.php:95
[19-Mar-2019 20:57:40 UTC] * log_warn(string(size 672)) at /home/planetco/public_html/mahara/lib/errors.php:859
[19-Mar-2019 20:57:40 UTC] * SQLException->__construct(string(size 672)) at /home/planetco/public_html/mahara/lib/dml.php:517
[19-Mar-2019 20:57:40 UTC] * get_recordset_sql(string(size 204), array(size 2), string(size 0), string(size 0)) at /home/planetco/public_html/mahara/lib/dml.php:683
[19-Mar-2019 20:57:40 UTC] * get_records_sql_assoc(string(size 198), array(size 2)) at /home/planetco/public_html/mahara/lib/view.php:2935
[19-Mar-2019 20:57:40 UTC] * View->get_layout() at /home/planetco/public_html/mahara/lib/view.php:1944
[19-Mar-2019 20:57:40 UTC] * View->build_column_datastructure(integer, false) at /home/planetco/public_html/mahara/lib/view.php:1973
[19-Mar-2019 20:57:40 UTC] * View->get_row_datastructure() at /home/planetco/public_html/mahara/lib/view.php:2297
[19-Mar-2019 20:57:40 UTC] * View->get_all_blocktype_javascript() at /home/planetco/public_html/mahara/index.php:35
[19-Mar-2019 20:57:40 UTC]
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/dml.php:517) Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows = '1'' at line 4] in EXECUTE("
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/dml.php:517) SELECT * FROM "mh_view_layout" vl
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/dml.php:517) JOIN "mh_usr_custom_layout" ucl
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/dml.php:517) ON ((vl.id = ucl.layout) AND (ucl.usr = 0 OR ucl.usr = '5'))
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/dml.php:517) WHERE rows = '1'")Command was:
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/dml.php:517) SELECT * FROM "mh_view_layout" vl
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/dml.php:517) JOIN "mh_usr_custom_layout" ucl
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/dml.php:517) ON ((vl.id = ucl.layout) AND (ucl.usr = 0 OR ucl.usr = ?))
[19-Mar-2019 20:57:40 UTC] [WAR] f2 (lib/dml.php:517) WHERE rows = ? and values was (0:5,1:1)
[19-Mar-2019 20:57:40 UTC] Call stack (most recent first):
[19-Mar-2019 20:57:40 UTC] * get_recordset_sql(string(size 204), array(size 2), string(size 0), string(size 0)) at /home/planetco/public_html/mahara/lib/dml.php:683
[19-Mar-2019 20:57:40 UTC] * get_records_sql_assoc(string(size 198), array(size 2)) at /home/planetco/public_html/mahara/lib/view.php:2935
[19-Mar-2019 20:57:40 UTC] * View->get_layout() at /home/planetco/public_html/mahara/lib/view.php:1944
[19-Mar-2019 20:57:40 UTC] * View->build_column_datastructure(integer, false) at /home/planetco/public_html/mahara/lib/view.php:1973
[19-Mar-2019 20:57:40 UTC] * View->get_row_datastructure() at /home/planetco/public_html/mahara/lib/view.php:2297
[19-Mar-2019 20:57:40 UTC] * View->get_all_blocktype_javascript() at /home/planetco/public_html/mahara/index.php:35
[19-Mar-2019 20:57:40 UTC]

Any assistance or insight would be greatly appreciated.

Robert Lyon's profile picture
Posts: 749

22 March 2019, 13:53

Hi Alan,

Looking at the first error the problem looks to be this bug: https://bugs.launchpad.net/mahara/+bug/1691329

Which was fixed with patch https://reviews.mahara.org/#/c/7765/2/htdocs/artefact/file/lib.php for Mahara 17.10.0

Can you check what version of Mahara you are on? You can check by viewing both admin/index.php under 'Mahara version' and also by looking in the file htdocs/lib/version.php at the lines $config->series and $config->release

Cheers

Robert

 

Alan Cook's profile picture
Posts: 3

23 March 2019, 16:37

I am using:

$config->version = 2017031611;
$config->series = '17.04';
$config->release = '17.04.2';

Robert Lyon's profile picture
Posts: 749

28 March 2019, 8:13

Hi Alan,

I recommend that you upgrade to a supported Mahara version (17.10, 18.04, or 18.10) - this should fix the problems you are having

Cheers

Robert

4 results