Forums | Mahara Community

Support /
Export and import


Emelie Vliet's profile picture
Posts: 9

30 November 2022, 3:36

Hi,

When I try to export all my data nothing happens and I get the following error code.

[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (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
[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/errors.php:853)                     SELECT artefact[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/errors.php:853)                     FROM "view_artefa' at line 1] in EXECUTE("SELECT id FROM "artefact" WHERE "owner" = ?UNION[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/errors.php:853)                     SELECT artefact[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/errors.php:853)                     FROM "view_artefact"[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/errors.php:853)                 WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/errors.php:853)                     ORDER BY id")Command was: SELECT id FROM "artefact" WHERE "owner" = ?UNION[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/errors.php:853)                     SELECT artefact[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/errors.php:853)                     FROM "view_artefact"[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/errors.php:853)                 WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/errors.php:853)                     ORDER BY id and values was (0:254,1:254)
[29-Nov-2022 13:49:09 Europe/Amsterdam] Call stack (most recent first):
[29-Nov-2022 13:49:09 Europe/Amsterdam]   * log_message(string(size 794), integer, true, true) at /home/portfolio/public_html/lib/errors.php:89[29-Nov-2022 13:49:09 Europe/Amsterdam]   * log_warn(string(size 794)) at /home/portfolio/public_html/lib/errors.php:853[29-Nov-2022 13:49:09 Europe/Amsterdam]   * SQLException->__construct(string(size 794)) at /home/portfolio/public_html/lib/dml.php:922[29-Nov-2022 13:49:09 Europe/Amsterdam]   * get_column_sql(string(size 231), array(size 2)) at /home/portfolio/public_html/export/lib.php:306[29-Nov-2022 13:49:09 Europe/Amsterdam]   * PluginExport->__construct(object(User), integer, integer, string(size 30), integer, integer, integer) at /home/portfolio/public_html/export/html/lib.php:83[29-Nov-2022 13:49:09 Europe/Amsterdam]   * PluginExportHtml->__construct(object(User), integer, integer, string(size 30), integer, integer, integer) at /home/portfolio/public_html/export/lib.php:1063[29-Nov-2022 13:49:09 Europe/Amsterdam]   * PluginExportAll->__construct(object(User), integer, integer, string(size 30)) at /home/portfolio/public_html/export/download.php:82
[29-Nov-2022 13:49:09 Europe/Amsterdam]
[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (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
[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/dml.php:922)                     SELECT artefact[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/dml.php:922)                     FROM "view_artefa' at line 1] in EXECUTE("SELECT id FROM "artefact" WHERE "owner" = ?UNION[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/dml.php:922)                     SELECT artefact[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/dml.php:922)                     FROM "view_artefact"[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/dml.php:922)                 WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/dml.php:922)                     ORDER BY id")Command was: SELECT id FROM "artefact" WHERE "owner" = ?UNION[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/dml.php:922)                     SELECT artefact[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/dml.php:922)                     FROM "view_artefact"[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/dml.php:922)                 WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)[29-Nov-2022 13:49:09 Europe/Amsterdam] [WAR] b0 (lib/dml.php:922)                     ORDER BY id and values was (0:254,1:254)
[29-Nov-2022 13:49:09 Europe/Amsterdam] Call stack (most recent first):
[29-Nov-2022 13:49:09 Europe/Amsterdam]   * get_column_sql(string(size 231), array(size 2)) at /home/portfolio/public_html/export/lib.php:306[29-Nov-2022 13:49:09 Europe/Amsterdam]   * PluginExport->__construct(object(User), integer, integer, string(size 30), integer, integer, integer) at /home/portfolio/public_html/export/html/lib.php:83[29-Nov-2022 13:49:09 Europe/Amsterdam]   * PluginExportHtml->__construct(object(User), integer, integer, string(size 30), integer, integer, integer) at /home/portfolio/public_html/export/lib.php:1063[29-Nov-2022 13:49:09 Europe/Amsterdam]   * PluginExportAll->__construct(object(User), integer, integer, string(size 30)) at /home/portfolio/public_html/export/download.php:82
[29-Nov-2022 13:49:09 Europe/Amsterdam]

When I try to export just one of the portfolio's (750 MB) It stops at it end (zipping file) and I receive following error code.

[29-Nov-2022 13:55:27 Europe/Amsterdam] [WAR] 7a (export/html/lib.php:1652) Undefined property: HtmlExportOutputFilter::$rootdir
[29-Nov-2022 13:55:27 Europe/Amsterdam] Call stack (most recent first):
[29-Nov-2022 13:55:27 Europe/Amsterdam]   * log_message(string(size 52), integer, true, true, string(size 47), integer) at /home/portfolio/public_html/lib/errors.php:515[29-Nov-2022 13:55:27 Europe/Amsterdam]   * error(integer, string(size 52), string(size 47), integer, array(size 9)) at /home/portfolio/public_html/export/html/lib.php:1652[29-Nov-2022 13:55:27 Europe/Amsterdam]   * HtmlExportOutputFilter->replace_thumbnail_link(array(size 4)) at Unknown:0[29-Nov-2022 13:55:27 Europe/Amsterdam]   * preg_replace_callback(string(size 105), array(size 2), string(size 26100)) at /home/portfolio/public_html/export/html/lib.php:1402[29-Nov-2022 13:55:27 Europe/Amsterdam]   * HtmlExportOutputFilter->filter(string(size 26100)) at /home/portfolio/public_html/export/html/lib.php:1057[29-Nov-2022 13:55:27 Europe/Amsterdam]   * PluginExportHtml->export_artefact_metadata_modals() at /home/portfolio/public_html/export/html/lib.php:278[29-Nov-2022 13:55:27 Europe/Amsterdam]   * PluginExportHtml->export() at /home/portfolio/public_html/export/lib.php:1110[29-Nov-2022 13:55:27 Europe/Amsterdam]   * PluginExportAll->export() at /home/portfolio/public_html/export/download.php:105
[29-Nov-2022 13:55:27 Europe/Amsterdam]


...../maharadata/export/254/1669726522 directory:
drwx------. 3 portfolio portfolio 27 Nov 29 13:55 export_info drwx------. 5 portfolio portfolio 86 Nov 29 13:55 HTML -rw-r--r--. 1 portfolio portfolio 309145 Nov 29 13:55 leap2a.xml -rw-r--r--. 1 portfolio portfolio 314302464 Nov 29 13:55 mahara-export-user254-2022-11-29_13-55.zip.n8bwvv.part drwx------. 3 portfolio portfolio 34 Nov 29 13:55 static

We are on centos 7.9

Can anyone tell me what I'm doing wrong or is anyone having the same problem?

When zipping the file manually I can view in the browser but uploading the leap 2A file in another mahara account results in a successful import of an empty template and an empty import folder in my files section....





Kristina Hoeppner's profile picture
Posts: 4739

01 December 2022, 14:21

Hi Emelie,

What version of Mahara are you using? When you import, do not only upload the Leap2A file. You need to upload the entire ZIP file because otherwise your files and other artefacts won't come along.

Thank you

Kristina

Emelie Vliet's profile picture
Posts: 9

16 December 2022, 1:23

We are currently using Mahara 22.04.2

Emelie Vliet's profile picture
Posts: 9

16 December 2022, 1:25

When exporting the system fails to create the zip file. It stops at the point where the file is being zipped

Kristina Hoeppner's profile picture
Posts: 4739

16 December 2022, 16:01

Hi Emelie,

Can you please check your server's error log for any information? It sounds like you might be missing the PHP Zip extension.

Cheers

Kristina

16 January 2023, 22:27

We are not missing the zip-extension.

It seems to be a memory problem. When creating the zip-file, it seems to allocate a lot of memory. When zipping an portfolio that holds movies for example, the php-process crashes on memory.

We can manually zip the portfolio, but Mahara can't.

How does Mahara create this zip file and did anyone test this with movies in the portfolio?

16 January 2023, 22:43

Schermafbeelding 2023-01-16 104241.png

These are our settings. The zip file usually breaks around 320 mb.

16 January 2023, 23:13

Also, is there a log somewhere that we can examine? We get no errors at all yet the zip-file never finishes.

Kristina Hoeppner's profile picture
Posts: 4739

19 January 2023, 7:57

Hi Richard,

Are you using the export queue or do you export portfolios straight away?

Thanks

Kristina

19 January 2023, 9:21

Students are using MANAGE -> EXPORT from the menu.

Then they try to export a collection or even a page. When there's a lot of data on it (f.e. a movie) the export fails.

I don't see a queue anywhere.

 

11 results