[OJS] Publisher Library is not uploading files when I add them?

When I go to Dashboard > Workflow > Publisher Library of my OJS I am unable to upload the file I added. I previously never had any issues uploading and adding a file. Now when I click OK the circle just spins and never completes the upload. Any ideas as to what I can try to solve this?

OJS 3.3.0.10

Hi @ATPCAT,

In instances where you see the spinning circle, it is best to check your PHP error logs and report on errors found there on the forum post - can you do this please?

-Roger
PKP Team

Hi @ATPCAT , @rcgillis I am facing the same problem my ojs version 3.3.0.14 and the error log show the following I could not figure out what that mean

Stack trace:
#0 /home/tjescom/public_html/ojs/lib/pkp/controllers/grid/files/LibraryFileGridHandler.inc.php(206): NewLibraryFileForm->execute()
#1 /home/tjescom/public_html/ojs/lib/pkp/classes/core/PKPRouter.inc.php(395): LibraryFileGridHandler->saveFile()
#2 /home/tjescom/public_html/ojs/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest()
#3 /home/tjescom/public_html/ojs/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route()
#4 /home/tjescom/public_html/ojs/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()
#5 /home/tjescom/public_html/ojs/index.php(68): PKPApplication->execute()
#6 {main}
thrown in /home/tjescom/public_html/ojs/lib/pkp/controllers/grid/settings/library/form/NewLibraryFileForm.inc.php on line 57

I contacted my website host and they checked for me that there is no server side issue nor error logged.

I presume it must be an issue with OJS but I have honestly have no idea and it has been like these for the past few months. I may try updating one of my sites to the latest version of OJS to see if the newest update fixes this bug.

1 Like

Hi @noni,

The actual error message is just above the lines you’ve quoted; can you add that as well?

Thanks,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi @asmecher here the error log Lines

[31-Oct-2023 15:54:23 Europe/Berlin] PHP Deprecated:  ZipArchive::open(): Using empty file as ZipArchive is deprecated in /home/tjescom/public_html/ojs/lib/pkp/classes/file/FileArchive.inc.php on line 37
[31-Oct-2023 16:16:58 Europe/Berlin] ojs2: 404 Not Found
[31-Oct-2023 16:17:40 Europe/Berlin] PHP Warning:  copy(/home/tjescom/ojsdata/contexts/1/library/styleSheet (1)-REP.css): Failed to open stream: No such file or directory in /home/tjescom/public_html/ojs/lib/pkp/classes/file/FileManager.inc.php on line 182
[31-Oct-2023 16:17:40 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to a member function setContextId() on bool in /home/tjescom/public_html/ojs/lib/pkp/controllers/grid/settings/library/form/NewLibraryFileForm.inc.php:57
Stack trace:
#0 /home/tjescom/public_html/ojs/lib/pkp/controllers/grid/files/LibraryFileGridHandler.inc.php(206): NewLibraryFileForm->execute()
#1 /home/tjescom/public_html/ojs/lib/pkp/classes/core/PKPRouter.inc.php(395): LibraryFileGridHandler->saveFile()
#2 /home/tjescom/public_html/ojs/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest()
#3 /home/tjescom/public_html/ojs/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route()
#4 /home/tjescom/public_html/ojs/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()
#5 /home/tjescom/public_html/ojs/index.php(68): PKPApplication->execute()
#6 {main}
  thrown in /home/tjescom/public_html/ojs/lib/pkp/controllers/grid/settings/library/form/NewLibraryFileForm.inc.php on line 57

Do you also get the spinning circle when you go to Users & Roles → Select a user → Press Email → Press Send Email?

The circle just spins forever and seems to timeout. Can you test to see if this also happens to you as I just stumbled across this problem and wish to see if it related to our original problem.

No I don’t have any problem in that section

I managed to solve the issue by upgrading the OJS version. Publisher Library works for me on 3.4.0.3/3.3.9.9.

I am sure this is the reason as I have other OJS sites still on 3.3.0.7/3.3.0.14 and they still have the issue with uploading onto Publisher Library.

1 Like

@ATPCAT but I have other journal with the same version it works fine without any problems

Did you find out eventually what was the cause?

Unfortunatly no i did not find out the problem