Forums | Mahara Community

Support /
College MCS: Site unavailable A nonrecoverable error occurred. This probably means you have encountered a bug in the system


09 January 2024, 14:29

Good day,

 

I have install Mahara, cannot create portfolio. Pls refer to attachment.

 

  • Screenshot.jpg
Kristina Hoeppner's profile picture
Posts: 4863

10 January 2024, 10:03

Hi,

Please check your error log for the actual error message. The screenshot only displays the generic information that an error occurred. Details are not displayed in production mode to prevent that potentially sensitive information is displayed to non-authorised people. The error message in your error log should give you more information on the cause of the problem.

Thank you

Kristina

11 January 2024, 22:25

Hey, I did what someone mentioned to do earlier on a different thread, to display the error messages, and here are the errors that pops up when I try to create a portfolio collection (also gives the general error for creation of anything else)



------------------------------------------------------------------------------------------------------------------------------------------


[WAR] 0f (lib/errors.php:852) Failed to get a recordset: mysqli error: [0: ] in EXECUTE("
            SELECT
                a.id, a.owner, a.group, a.institution, a.artefacttype, a.mtime, f.size, fi.orientation, fi.isdecorative, fi.alttext, fi.altiscaption, a.title, a.description, a.license, a.licensor, a.licensorurl, a.locked, a.allowcomments, u.profileicon AS defaultprofileicon, a.author,
                COUNT(DISTINCT c.id) AS childcount, COUNT (DISTINCT aa.artefact) AS attachcount, COUNT(DISTINCT va.view) AS viewcount, COUNT(DISTINCT s.id) AS skincount,
                COUNT(DISTINCT api.id) AS profileiconcount, COUNT(DISTINCT fpa.id) AS postcount
            FROM "mhc0_artefact" a
                LEFT OUTER JOIN "mhc0_artefact_file_files" f ON f.artefact = a.id
                LEFT OUTER JOIN "mhc0_artefact_file_image" fi ON fi.artefact = a.id
                LEFT OUTER JOIN "mhc0_artefact" c ON c.parent = a.id
                LEFT OUTER JOIN "mhc0_artefact" api ON api.parent = a.id AND api.artefacttype = 'profileicon'
                LEFT OUTER JOIN "mhc0_view_artefact" va ON va.artefact = a.id
                LEFT OUTER JOIN "mhc0_artefact_attachment" aa ON aa.attachment = a.id
                LEFT OUTER JOIN "mhc0_skin" s ON (s.bodybgimg = a.id OR s.headingbgimg = a.id)
                LEFT OUTER JOIN "mhc0_interaction_forum_post_attachment" fpa ON fpa.attachment = a.id
                LEFT OUTER JOIN "mhc0_usr" u ON a.id = u.profileicon AND a.owner = u.id
            WHERE a.artefacttype IN ('image','folder')
            AND a.institution IS NULL AND a.owner = ?
            AND a.parent = ?
            GROUP BY
                a.id, a.artefacttype, a.mtime, f.size, a.title, a.description, a.license, a.licensor, a.licensorurl, a.locked, a.allowcomments,
                u.profileicon, fi.orientation, fi.isdecorative, fi.alttext, fi.altiscaption")Command was:
            SELECT
                a.id, a.owner, a.group, a.institution, a.artefacttype, a.mtime, f.size, fi.orientation, fi.isdecorative, fi.alttext, fi.altiscaption, a.title, a.description, a.license, a.licensor, a.licensorurl, a.locked, a.allowcomments, u.profileicon AS defaultprofileicon, a.author,
                COUNT(DISTINCT c.id) AS childcount, COUNT (DISTINCT aa.artefact) AS attachcount, COUNT(DISTINCT va.view) AS viewcount, COUNT(DISTINCT s.id) AS skincount,
                COUNT(DISTINCT api.id) AS profileiconcount, COUNT(DISTINCT fpa.id) AS postcount
            FROM "mhc0_artefact" a
                LEFT OUTER JOIN "mhc0_artefact_file_files" f ON f.artefact = a.id
                LEFT OUTER JOIN "mhc0_artefact_file_image" fi ON fi.artefact = a.id
                LEFT OUTER JOIN "mhc0_artefact" c ON c.parent = a.id
                LEFT OUTER JOIN "mhc0_artefact" api ON api.parent = a.id AND api.artefacttype = 'profileicon'
                LEFT OUTER JOIN "mhc0_view_artefact" va ON va.artefact = a.id
                LEFT OUTER JOIN "mhc0_artefact_attachment" aa ON aa.attachment = a.id
                LEFT OUTER JOIN "mhc0_skin" s ON (s.bodybgimg = a.id OR s.headingbgimg = a.id)
                LEFT OUTER JOIN "mhc0_interaction_forum_post_attachment" fpa ON fpa.attachment = a.id
                LEFT OUTER JOIN "mhc0_usr" u ON a.id = u.profileicon AND a.owner = u.id
            WHERE a.artefacttype IN ('image','folder')
            AND a.institution IS NULL AND a.owner = ?
            AND a.parent = ?
            GROUP BY
                a.id, a.artefacttype, a.mtime, f.size, a.title, a.description, a.license, a.licensor, a.licensorurl, a.locked, a.allowcomments,
                u.profileicon, fi.orientation, fi.isdecorative, fi.alttext, fi.altiscaption and values was (0:1,1:11) 


------------------------------------------------------------------------------------------------------------------------------------------


Call stack (most recent first):

  • log_message(string(size 3692), integer, true, true) at /home/rootmyuni/public_html/eportfolio/lib/errors.php:89
  • log_warn(string(size 3692)) at /home/rootmyuni/public_html/eportfolio/lib/errors.php:852
  • SQLException->__construct(string(size 3692)) at /home/rootmyuni/public_html/eportfolio/lib/dml.php:540
  • get_recordset_sql(string(size 1796), array(size 2), string(size 0), string(size 0)) at /home/rootmyuni/public_html/eportfolio/lib/dml.php:721
  • get_records_sql_assoc(string(size 1746), array(size 2)) at /home/rootmyuni/public_html/eportfolio/artefact/file/lib.php:655
  • ArtefactTypeFileBase::get_my_files_data(integer, integer, null, null, array(size 1)) at /home/rootmyuni/public_html/eportfolio/lib/form/elements/filebrowser.php:169
  • pieform_element_filebrowser(object(Pieform), array(size 19)) at /home/rootmyuni/public_html/eportfolio/lib/pieforms/pieform.php:1602
  • Pieform->build_element_html(array(size 19)) at /home/rootmyuni/public_html/eportfolio/lib/pieforms/pieform.php:757
  • Pieform->build() at /home/rootmyuni/public_html/eportfolio/lib/pieforms/pieform.php:164
  • Pieform::process(array(size 10)) at /home/rootmyuni/public_html/eportfolio/lib/mahara.php:5787
  • pieform(array(size 10)) at /home/rootmyuni/public_html/eportfolio/collection/edit.php:131

------------------------------------------------------------------------------------------------------------------------------------------


[WAR] 14 (lib/dml.php:540) Failed to get a recordset: mysqli error: [0: ] in EXECUTE("
            SELECT
                a.id, a.owner, a.group, a.institution, a.artefacttype, a.mtime, f.size, fi.orientation, fi.isdecorative, fi.alttext, fi.altiscaption, a.title, a.description, a.license, a.licensor, a.licensorurl, a.locked, a.allowcomments, u.profileicon AS defaultprofileicon, a.author,
                COUNT(DISTINCT c.id) AS childcount, COUNT (DISTINCT aa.artefact) AS attachcount, COUNT(DISTINCT va.view) AS viewcount, COUNT(DISTINCT s.id) AS skincount,
                COUNT(DISTINCT api.id) AS profileiconcount, COUNT(DISTINCT fpa.id) AS postcount
            FROM "mhc0_artefact" a
                LEFT OUTER JOIN "mhc0_artefact_file_files" f ON f.artefact = a.id
                LEFT OUTER JOIN "mhc0_artefact_file_image" fi ON fi.artefact = a.id
                LEFT OUTER JOIN "mhc0_artefact" c ON c.parent = a.id
                LEFT OUTER JOIN "mhc0_artefact" api ON api.parent = a.id AND api.artefacttype = 'profileicon'
                LEFT OUTER JOIN "mhc0_view_artefact" va ON va.artefact = a.id
                LEFT OUTER JOIN "mhc0_artefact_attachment" aa ON aa.attachment = a.id
                LEFT OUTER JOIN "mhc0_skin" s ON (s.bodybgimg = a.id OR s.headingbgimg = a.id)
                LEFT OUTER JOIN "mhc0_interaction_forum_post_attachment" fpa ON fpa.attachment = a.id
                LEFT OUTER JOIN "mhc0_usr" u ON a.id = u.profileicon AND a.owner = u.id
            WHERE a.artefacttype IN ('image','folder')
            AND a.institution IS NULL AND a.owner = ?
            AND a.parent = ?
            GROUP BY
                a.id, a.artefacttype, a.mtime, f.size, a.title, a.description, a.license, a.licensor, a.licensorurl, a.locked, a.allowcomments,
                u.profileicon, fi.orientation, fi.isdecorative, fi.alttext, fi.altiscaption")Command was:
            SELECT
                a.id, a.owner, a.group, a.institution, a.artefacttype, a.mtime, f.size, fi.orientation, fi.isdecorative, fi.alttext, fi.altiscaption, a.title, a.description, a.license, a.licensor, a.licensorurl, a.locked, a.allowcomments, u.profileicon AS defaultprofileicon, a.author,
                COUNT(DISTINCT c.id) AS childcount, COUNT (DISTINCT aa.artefact) AS attachcount, COUNT(DISTINCT va.view) AS viewcount, COUNT(DISTINCT s.id) AS skincount,
                COUNT(DISTINCT api.id) AS profileiconcount, COUNT(DISTINCT fpa.id) AS postcount
            FROM "mhc0_artefact" a
                LEFT OUTER JOIN "mhc0_artefact_file_files" f ON f.artefact = a.id
                LEFT OUTER JOIN "mhc0_artefact_file_image" fi ON fi.artefact = a.id
                LEFT OUTER JOIN "mhc0_artefact" c ON c.parent = a.id
                LEFT OUTER JOIN "mhc0_artefact" api ON api.parent = a.id AND api.artefacttype = 'profileicon'
                LEFT OUTER JOIN "mhc0_view_artefact" va ON va.artefact = a.id
                LEFT OUTER JOIN "mhc0_artefact_attachment" aa ON aa.attachment = a.id
                LEFT OUTER JOIN "mhc0_skin" s ON (s.bodybgimg = a.id OR s.headingbgimg = a.id)
                LEFT OUTER JOIN "mhc0_interaction_forum_post_attachment" fpa ON fpa.attachment = a.id
                LEFT OUTER JOIN "mhc0_usr" u ON a.id = u.profileicon AND a.owner = u.id
            WHERE a.artefacttype IN ('image','folder')
            AND a.institution IS NULL AND a.owner = ?
            AND a.parent = ?
            GROUP BY
                a.id, a.artefacttype, a.mtime, f.size, a.title, a.description, a.license, a.licensor, a.licensorurl, a.locked, a.allowcomments,
                u.profileicon, fi.orientation, fi.isdecorative, fi.alttext, fi.altiscaption and values was (0:1,1:11)


------------------------------------------------------------------------------------------------------------------------------------------

Call stack (most recent first):

  • get_recordset_sql(string(size 1796), array(size 2), string(size 0), string(size 0)) at /home/rootmyuni/public_html/eportfolio/lib/dml.php:721
  • get_records_sql_assoc(string(size 1746), array(size 2)) at /home/rootmyuni/public_html/eportfolio/artefact/file/lib.php:655
  • ArtefactTypeFileBase::get_my_files_data(integer, integer, null, null, array(size 1)) at /home/rootmyuni/public_html/eportfolio/lib/form/elements/filebrowser.php:169
  • pieform_element_filebrowser(object(Pieform), array(size 19)) at /home/rootmyuni/public_html/eportfolio/lib/pieforms/pieform.php:1602
  • Pieform->build_element_html(array(size 19)) at /home/rootmyuni/public_html/eportfolio/lib/pieforms/pieform.php:757
  • Pieform->build() at /home/rootmyuni/public_html/eportfolio/lib/pieforms/pieform.php:164
  • Pieform::process(array(size 10)) at /home/rootmyuni/public_html/eportfolio/lib/mahara.php:5787
  • pieform(array(size 10)) at /home/rootmyuni/public_html/eportfolio/collection/edit.php:131
Robert Lyon's profile picture
Posts: 773

15 January 2024, 11:09

Hi,

If you are still having issues with this then the next thing I would try is to run the command on the database directly to see if that returns an error / more information. So in your case the command to run would be:

SELECT
                a.id, a.owner, a.group, a.institution, a.artefacttype, a.mtime, f.size, fi.orientation, fi.isdecorative, fi.alttext, fi.altiscaption, a.title, a.description, a.license, a.licensor, a.licensorurl, a.locked, a.allowcomments, u.profileicon AS defaultprofileicon, a.author,
                COUNT(DISTINCT c.id) AS childcount, COUNT (DISTINCT aa.artefact) AS attachcount, COUNT(DISTINCT va.view) AS viewcount, COUNT(DISTINCT s.id) AS skincount,
                COUNT(DISTINCT api.id) AS profileiconcount, COUNT(DISTINCT fpa.id) AS postcount
            FROM mhc0_artefact a
                LEFT OUTER JOIN mhc0_artefact_file_files f ON f.artefact = a.id
                LEFT OUTER JOIN mhc0_artefact_file_image fi ON fi.artefact = a.id
                LEFT OUTER JOIN mhc0_artefact c ON c.parent = a.id
                LEFT OUTER JOIN mhc0_artefact api ON api.parent = a.id AND api.artefacttype = 'profileicon'
                LEFT OUTER JOIN mhc0_view_artefact va ON va.artefact = a.id
                LEFT OUTER JOIN mhc0_artefact_attachment aa ON aa.attachment = a.id
                LEFT OUTER JOIN mhc0_skin s ON (s.bodybgimg = a.id OR s.headingbgimg = a.id)
                LEFT OUTER JOIN mhc0_interaction_forum_post_attachment fpa ON fpa.attachment = a.id
                LEFT OUTER JOIN mhc0_usr u ON a.id = u.profileicon AND a.owner = u.id
            WHERE a.artefacttype IN ('image','folder')
            AND a.institution IS NULL AND a.owner = 1
            AND a.parent = 11
            GROUP BY
                a.id, a.artefacttype, a.mtime, f.size, a.title, a.description, a.license, a.licensor, a.licensorurl, a.locked, a.allowcomments,
                u.profileicon, fi.orientation, fi.isdecorative, fi.alttext, fi.altiscaption

And if that fails - oh it fails for me direct on database (but not via Mahara system)

I get an error  '...syntax to use near DISTINCT aa.artefact)...'

It seems to not like the space after COUNT in 'COUNT (DISTINCT aa.artefact) AS attachcount'

In the file htdocs/artefact/file/lib.php within the function get_my_files_data() can you try and change the code

COUNT (DISTINCT aa.artefact) AS attachcount

to

COUNT(DISTINCT aa.artefact) AS attachcount

to see if that makes any difference

Cheers

Robert

 

4 results