Pdf.js viewer not working on ojs 3.3.0.8

after update my ojs fro 3.1.2.0 to 3.3.0.8 now i cant view any pdf only download it i’ve tried to reinstall the plugin also delete the cash but still not wroking

Hi @null_Byte,

I’m wondering if you might want to try the approach offered in this post:

Perhaps give that a try and see how it goes?

-Roger
PKP Team

yes the path in config.inc.php is correct

Hi @null_Byte,

Hmm… I’m unsure of what to suggest at this point. Hopefully someone else might be able to make a suggestion as to what to try next.

-Roger
PKP Team

Hi @null_Byte,

Have you manually tried to update the version of the PDF.js viewer included in the OJS plugin? It looks like something is missing there. I would suggest going back to the stock version that came with your OJS release.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher I have same Issue on OJS 3.1.2 The PDF its show up but after Upgrade to 3.2.0.0 i cant view any pdf only download it and i also have try this suggestion : Update pdf.js library to the latest version · Issue #69 · pkp/pdfJsViewer · GitHub but its still not working

Hi @Fauji_Nurdin,

I suspect any modifications or attempts to update pdf.js are probably confusing things further. Your best path is probably to revert any changes you’ve made, and then upgrade OJS to a newer release; OJS 3.2.0.0 is now quite obsolete. I’d recommend using the latest LTS release. You’ll get a newer PDF.js just by doing that.

Regards,
Alec Smecher
Public Knowledge Project Team

hi @asmecher I have success Upgrade it from vesion 3.1.2 to 3.2.0.0 and the last update 3.4.8 However the problems cause this things happen is because the cache on the cloudflare , the solution that i take is before Upgrade i change the cloudflare mode into development mode and clear all the cache, and after a few hour the PDF File is show up and im glad that the journal upgrade it to the newest version but there is also a problem when i activate or instal plugin the “OK” Button its cannot clik (some kind of freez situation ) but after i reload the browser there is notificattion that the Plugin succsess instaled… and i check the error log :
[06-Jan-2025 13:55:40 UTC] PHP Deprecated: stripslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /home/ejurnals/public_html/lib/pkp/classes/citation/Citation.php on line 118
[06-Jan-2025 13:55:40 UTC] PHP Deprecated: stripslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /home/ejurnals/public_html/lib/pkp/classes/citation/Citation.php on line 118
[06-Jan-2025 13:55:40 UTC] PHP Deprecated: stripslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /home/ejurnals/public_html/lib/pkp/classes/citation/Citation.php on line 118
[06-Jan-2025 13:55:40 UTC] PHP Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /home/ejurnals/public_html/plugins/generic/citations/CitationsPlugin.php on line 68

Hi @Fauji_Nurdin,

Those warnings are cosmetic, and probably not related to the issue you’re encountering. Look further up in your error log for something containing the word Fatal or Exception.

Regards,
Alec Smecher
Public Knowledge Project Team

FYI i upgrade this jour nal from 2.4.8 to 3.1.2 to 3.2.0.0 and 3.4.8

from hundred lines of error i foun this :

[06-Jan-2025 03:13:42 UTC] PHP Fatal error: Uncaught Exception: Creating archive with submission files failed! in /home/ejurnals/public_html/lib/pkp/controllers/api/file/FileApiHandler.php:184
Stack trace:
#0 [internal function]: PKP\controllers\api\file\FileApiHandler->downloadAllFiles(Array, Object(APP\core\Request))
#1 /home/ejurnals/public_html/lib/pkp/classes/core/PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request))
#2 /home/ejurnals/public_html/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array)
#3 /home/ejurnals/public_html/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPComponentRouter->route(Object(APP\core\Request))
#4 /home/ejurnals/public_html/lib/pkp/classes/core/PKPApplication.php(395): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#5 /home/ejurnals/public_html/index.php(21): PKP\core\PKPApplication->execute()
#6 {main}
thrown in /home/ejurnals/public_html/lib/pkp/controllers/api/file/FileApiHandler.php on line 184

its there any cance to stop this error : [06-Jan-2025 13:55:40 UTC] PHP Deprecated: stripslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /home/ejurnals/public_html/lib/pkp/classes/citation/Citation.php on line 118

because most of the error log are this line an the error log size everyday getting Bigger

Hi @Fauji_Nurdin,

I think you mean 3.4.0-8, not 3.4.8; there is no 3.4.8 release.

Messages like:

PHP Fatal error: Uncaught Exception: Creating archive with submission files failed!

…can usually be solved by either properly configuring the tar option in the [cli] section of config.inc.php, or by making sure the zip extension is enabled in your PHP configuration.

Because your posts aren’t related to the original topic (“PDF.js viewer not working on OJS 3.3.0-8”), I’m going to close this topic to help keep the forum organized by subject – but feel free to open a new one as you continue to debug and fix your installation.

Regards,
Alec Smecher
Public Knowledge Project Team