Forums | Mahara Community

Support /
Portfolio Export not working


Nitin Mishra's profile picture
Posts: 25

13 June 2022, 23:24

I am using Mahara 22.04.1 version, while exporting the portfolio (Html, Html Lite, Leaf2A, Pdf, Pdf Lite) error logs store SQL exception errors as below:

(lib/errors.php:853) Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?UNION
(lib/errors.php:853) SELECT artefact
(lib/errors.php:853) FROM "view_artefa' at line 1] in EXECUTE("SELECT id FROM "artefact" WHERE "owner" = ?UNION
(lib/errors.php:853) SELECT artefact
(lib/errors.php:853) FROM "view_artefact"
(lib/errors.php:853) WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)
(lib/errors.php:853) ORDER BY id")Command was: SELECT id FROM "artefact" WHERE "owner" = ?UNION
(lib/errors.php:853) SELECT artefact
(lib/errors.php:853) FROM "view_artefact"
(lib/errors.php:853) WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)
(lib/errors.php:853) ORDER BY id and values was (0:1,1:1)
Call stack (most recent first):
  * log_message(string(size 790), integer, true, true) at /home/xxxxxx/public_html/lib/errors.php:89
  * log_warn(string(size 790)) at /home/xxxxxx/public_html/lib/errors.php:853
  * SQLException->__construct(string(size 790)) at /home/xxxxxx/public_html/lib/dml.php:922
  * get_column_sql(string(size 231), array(size 2)) at /home/xxxxxx/public_html/export/lib.php:306
  * PluginExport->__construct(object(User), integer, integer, string(size 30), integer, integer, integer) at /home/xxxxxx/public_html/export/html/lib.php:83
  * PluginExportHtml->__construct(object(User), integer, integer, string(size 30), integer, integer, integer) at /home/xxxxxx/public_html/export/lib.php:1063
  * PluginExportAll->__construct(object(User), integer, integer, string(size 30)) at /home/xxxxxx/public_html/export/download.php:82

(lib/dml.php:922) Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?UNION
(lib/dml.php:922) SELECT artefact
(lib/dml.php:922) FROM "view_artefa' at line 1] in EXECUTE("SELECT id FROM "artefact" WHERE "owner" = ?UNION
(lib/dml.php:922) SELECT artefact
(lib/dml.php:922) FROM "view_artefact"
(lib/dml.php:922) WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)
(lib/dml.php:922) ORDER BY id")Command was: SELECT id FROM "artefact" WHERE "owner" = ?UNION
(lib/dml.php:922) SELECT artefact
(lib/dml.php:922) FROM "view_artefact"
(lib/dml.php:922) WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)
(lib/dml.php:922) ORDER BY id and values was (0:1,1:1)
Call stack (most recent first):
  * get_column_sql(string(size 231), array(size 2)) at /home/xxxxxx/public_html/export/lib.php:306
  * PluginExport->__construct(object(User), integer, integer, string(size 30), integer, integer, integer) at /home/xxxxxx/public_html/export/html/lib.php:83
  * PluginExportHtml->__construct(object(User), integer, integer, string(size 30), integer, integer, integer) at /home/xxxxxx/public_html/export/lib.php:1063
  * PluginExportAll->__construct(object(User), integer, integer, string(size 30)) at /home/xxxxxx/public_html/export/download.php:82

Also, I am using PHP 7.4 & Mysql 5.6 Version, and the server has all required extensions as mentioned in the Mahara standard document. Also increased all php.ini limits. Please suggest any solution.

Kristina Hoeppner's profile picture
Posts: 4863

14 June 2022, 8:24

This was also filed as a bug report.

2 results