Forums | Mahara Community

Support /
pdf export not working in 22.04.3 version of mahara on centos 7.9


Nitin Mishra's profile picture
Posts: 25

21 November 2022, 23:29

After enabling the pdf export & pdf lite extensions the portfolio export stops.

 

Error logs:

Error logs are below(path- public_html/export/error_log):
Error logs are below(path- public_html/export/error_log):
[20-Nov-2022 20:34:36 America/Adak] [WAR] a0 (export/html/lib.php:1652) Undefined property: HtmlExportOutputFilter::$rootdir
[20-Nov-2022 20:34:36 America/Adak] Call stack (most recent first):
[20-Nov-2022 20:34:36 America/Adak] * log_message(string(size 52), integer, true, true, string(size 53), integer) at /home/*******/public_html/lib/errors.php:515
[20-Nov-2022 20:34:36 America/Adak] * error(integer, string(size 52), string(size 53), integer, array(size 9)) at /home/*******/public_html/export/html/lib.php:1652
[20-Nov-2022 20:34:36 America/Adak] * HtmlExportOutputFilter->replace_thumbnail_link(array(size 4)) at Unknown:0
[20-Nov-2022 20:34:36 America/Adak] * preg_replace_callback(string(size 113), array(size 2), string(size 942)) at /home/*******/public_html/export/html/lib.php:1402
[20-Nov-2022 20:34:36 America/Adak] * HtmlExportOutputFilter->filter(string(size 942)) at /home/*******/public_html/export/html/lib.php:605
[20-Nov-2022 20:34:36 America/Adak] * PluginExportHtml->dump_view_export_data() at /home/*******/public_html/export/html/lib.php:274
[20-Nov-2022 20:34:36 America/Adak] * PluginExportHtml->export(false) at /home/*******/public_html/export/pdf/lib.php:169
[20-Nov-2022 20:34:36 America/Adak] * PluginExportPdf->export() at /home/*******/public_html/export/lib.php:1102
[20-Nov-2022 20:34:36 America/Adak] * PluginExportAll->export() at /home/*******/public_html/export/download.php:105
[20-Nov-2022 20:34:36 America/Adak]
[20-Nov-2022 20:34:36 America/Adak] [WAR] a0 (lib/errors.php:537) Need to have a Chrome browser installed to use the headless pdf option. at /home/*******/public_html/export/pdf/lib.php:219
[20-Nov-2022 20:34:36 America/Adak] Call stack (most recent first):
[20-Nov-2022 20:34:36 America/Adak] * exception(object(MaharaException)) at Unknown:0

 

We already installed headless chrome on the server.

  • pdf-export-error.jpg
Nitin Mishra's profile picture
Posts: 25

24 November 2022, 20:00

make all & make pdfexport commands are working but still having the same issue. Also installed dependent extensions on the centos server.

Recent Error log:

[23-Nov-2022 20:45:51 America/Adak] [WAR] 85 (export/html/lib.php:1652) Undefined property: HtmlExportOutputFilter::$rootdir
[23-Nov-2022 20:45:51 America/Adak] Call stack (most recent first):
[23-Nov-2022 20:45:51 America/Adak]   * log_message(string(size 52), integer, true, true, string(size 53), integer) at /home/*******/public_html/lib/errors.php:515
[23-Nov-2022 20:45:51 America/Adak]   * error(integer, string(size 52), string(size 53), integer, array(size 9)) at /home/*******/public_html/export/html/lib.php:1652
[23-Nov-2022 20:45:51 America/Adak]   * HtmlExportOutputFilter->replace_thumbnail_link(array(size 4)) at Unknown:0
[23-Nov-2022 20:45:51 America/Adak]   * preg_replace_callback(string(size 113), array(size 2), string(size 942)) at /home/*******/public_html/export/html/lib.php:1402
[23-Nov-2022 20:45:51 America/Adak]   * HtmlExportOutputFilter->filter(string(size 942)) at /home/*******/public_html/export/html/lib.php:605
[23-Nov-2022 20:45:51 America/Adak]   * PluginExportHtml->dump_view_export_data() at /home/*******/public_html/export/html/lib.php:274
[23-Nov-2022 20:45:51 America/Adak]   * PluginExportHtml->export(false) at /home/*******/public_html/export/pdf/lib.php:169
[23-Nov-2022 20:45:51 America/Adak]   * PluginExportPdf->export() at /home/*******/public_html/export/lib.php:1102
[23-Nov-2022 20:45:51 America/Adak]   * PluginExportAll->export() at /home/*******/public_html/export/download.php:105
[23-Nov-2022 20:45:51 America/Adak] 
[23-Nov-2022 20:45:51 America/Adak] [WAR] 85 (lib/errors.php:537) Need to have a Chrome browser installed to use the headless pdf option. at /home/*******/public_html/export/pdf/lib.php:219
[23-Nov-2022 20:45:51 America/Adak] Call stack (most recent first):
[23-Nov-2022 20:45:51 America/Adak]   * exception(object(MaharaException)) at Unknown:0
[23-Nov-2022 20:45:51 America/Adak] 

Nitin Mishra's profile picture
Posts: 25

25 November 2022, 0:59

[PROBLEM FIXED]
For centos 7 -
There is an incorrect $browsertype value in public_html/export/pdf/lib.php, use 'chromium' instead of 'chromium-browser'. If we run the command 'rpm -qa | grep chromium-browser' on the terminal it through as error 'Need to have a Chrome browser installed to use the headless pdf option'.

So please use 'chromium' instead of 'chromium-browser' for pdf export. It works for me.

Also, I installed npm & gulp on the centos server before these settings.

Nitin Mishra's profile picture
Posts: 25

01 December 2022, 23:19

Now pdf export is working fine but 1 error still remains:

Error log -

[30-Nov-2022 23:47:24 America/Adak] [WAR] bb (export/html/lib.php:1652) Undefined property: HtmlExportOutputFilter::$rootdir
[30-Nov-2022 23:47:24 America/Adak] Call stack (most recent first):
[30-Nov-2022 23:47:24 America/Adak]   * log_message(string(size 52), integer, true, true, string(size 50), integer) at /home/*******/public_html/lib/errors.php:515
[30-Nov-2022 23:47:24 America/Adak]   * error(integer, string(size 52), string(size 50), integer, array(size 9)) at /home/*******/public_html/export/html/lib.php:1652
[30-Nov-2022 23:47:24 America/Adak]   * HtmlExportOutputFilter->replace_thumbnail_link(array(size 4)) at Unknown:0
[30-Nov-2022 23:47:24 America/Adak]   * preg_replace_callback(string(size 110), array(size 2), string(size 1289)) at /home/*******/public_html/export/html/lib.php:1402
[30-Nov-2022 23:47:24 America/Adak]   * HtmlExportOutputFilter->filter(string(size 1289)) at /home/*******/public_html/export/html/lib.php:605
[30-Nov-2022 23:47:24 America/Adak]   * PluginExportHtml->dump_view_export_data() at /home/*******/public_html/export/html/lib.php:274
[30-Nov-2022 23:47:24 America/Adak]   * PluginExportHtml->export() at /home/*******/public_html/export/lib.php:1110
[30-Nov-2022 23:47:24 America/Adak]   * PluginExportAll->export() at /home/*******/public_html/export/download.php:105

Robert Lyon's profile picture
Posts: 774

05 December 2022, 13:28

Hi Nitin,

For that latest issue I've created a fix here https://reviews.mahara.org/c/mahara/+/13541

Can you please try the change and see if the error is fixed for you?

Cheers

Robert

Nitin Mishra's profile picture
Posts: 25

05 December 2022, 23:46

Thanks, Robert

 

The problem is now fixed.  Again thanks.

6 results