OMP v3.1.2 can't display pdf

#1

Hi,
we installed OMP v3.1.2, because we start a new project for which we would like to use this software.
Unfortunaly we came upon some mistakes, e.g. we can’t display our pdf files.
In the log files I see these error messages:

[Mon Apr 08 15:21:59.033438 2019] [:error] [pid 67207] [client 10.0.0.94:53066] PHP Warning: filemtime(): stat failed for lib/pkp/templates/plugins/generic/pdfJsViewer/templates/display.tpl in /opt/omp-3.1.2/lib/pkp/classes/template/PKPTemplateResource.inc.php on line 51, referer: https://t-sr-omp.ub.uni-muenchen.de/index.php/omp/catalog/book/2
[Mon Apr 08 15:21:59.033597 2019] [:error] [pid 67207] [client 10.0.0.94:53066] PHP Fatal error: Uncaught --> Smarty: Unable to load template ‘app:plugins/generic/pdfJsViewer/templates/display.tpl’ <-- \n thrown in /opt/omp-3.1.2/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195, referer: https://t-sr-omp.ub.uni-muenchen.de/index.php/omp/catalog/book/2

Does anybody have an idea what is the reason for this error?

thanks,
Anna

#2

Hi Anna

How did you install OJS? Did you download a distribution .tar.gz or did you install from github? Does the file plugins/generic/pdfJsViewer/display.tpl exist?

Cheers,
Jason

#3

My apologies - I meant OMP. Please check for the template though.

Cheers,

#4

HELP!!

Hello, I have the same error, when I open the PDF I get an error 500.

Install version 3.1.2.0 from Softaculous.

(upload://wwbXRAKLBQbLdhUFXWtm3iT2SVT.jpeg)

[08-Apr-2019 18:05:10 CST6CDT] PHP Deprecated: Non-static method PKPApplication::getCCLicenseBadge() should not be called statically in /home/public27/public_html/libros/pages/catalog/CatalogBookHandler.inc.php on line 90
[08-Apr-2019 18:34:44 CST6CDT] PHP Deprecated: Non-static method PKPApplication::getCCLicenseBadge() should not be called statically in /home/public27/public_html/libros/pages/catalog/CatalogBookHandler.inc.php on line 90
[08-Apr-2019 18:34:44 CST6CDT] PHP Deprecated: Non-static method PKPApplication::getCCLicenseBadge() should not be called statically in /home/public27/public_html/libros/pages/catalog/CatalogBookHandler.inc.php on line 90
[09-Apr-2019 00:38:19 CST6CDT] PHP Deprecated: Non-static method PKPApplication::getCCLicenseBadge() should not be called statically in /home/public27/public_html/libros/pages/catalog/CatalogBookHandler.inc.php on line 90
[09-Apr-2019 00:38:34 CST6CDT] PHP Deprecated: Non-static method Request::getContext() should not be called statically in /home/public27/public_html/libros/plugins/generic/dublinCoreMeta/DublinCoreMetaPlugin.inc.php on line 137
[09-Apr-2019 00:38:34 CST6CDT] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically in /home/public27/public_html/libros/classes/core/Request.inc.php on line 69
[09-Apr-2019 00:38:34 CST6CDT] PHP Fatal error: Uncaught --> Smarty: Unable to load template ‘app:plugins/generic/pdfJsViewer/templates/display.tpl’ <–
thrown in /home/public27/public_html/libros/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195
[09-Apr-2019 00:38:37 CST6CDT] PHP Deprecated: Non-static method PKPApplication::getCCLicenseBadge() should not be called statically in /home/public27/public_html/libros/pages/catalog/CatalogBookHandler.inc.php on line 90

#5

Hi @jnugent,
I downloaded the newest distribution .tar.gz.
the display.tpl exists, but under /opt/omp-3.1.2/plugins/generic/pdfJsViewer/templates/display.tpl
tpl

thanks for your support,
Anna

#6

Hi all,

There is a patch for that here: https://github.com/pkp/pkp-lib/issues/4576

Regards,
Alec Smecher
Public Knowledge Project Team

#7

Thanks for your quick responses, after applying the changes the pdf viewer works fine.
best regards,
Anna

#8

Hi akku, how did you solve it? I followed the steps of the forum but the error persists.

#9

Hi @Jorge_Navarro,
I did the changes in the

plugins/generic/pdfJsViewer/PdfJsViewerPlugin.inc.php

as described here:

https://github.com/pkp/omp/commit/cccc763e2afdf2e9c8fc360c81ac46f9c7f5721b

and everything worked fine.

best regards, Anna