Files are not uploading to Publisher Library

Hi!

OJS 3.4.0-7
PHP version 8.1.31

Files are not uploaded to the Publisher Library in the Workflow Settings section. All fields are filled in correctly, after clicking OK, an endless upload begins. You can cancel by clicking Cancel. Accordingly, the files are not added to the Publisher Library. Files are uploaded to other sections of the site without problems.

Help solve this problem. Thank`s!

Hi @GNPU,

The endless upload error suggests that you ought to check your PHP error logs. Could you do that and report back on what you find in the logs? If unsure of how to do that, please see here:

-Roger
PKP Team

PHP log:

[09-Jan-2025 16:00:55 Europe/Kyiv] PHP Warning:  copy(/home2/gnpueduu/journals.gnpu.edu.ua/files/contexts/1/library/5409f5d1-92c5-4a89-9071-2df8b881a0e8-MAR.webp): Failed to open stream: No such file or directory in /home2/gnpueduu/journals.gnpu.edu.ua/lib/pkp/classes/file/FileManager.php on line 236
[09-Jan-2025 16:00:55 Europe/Kyiv] PHP Fatal error:  Uncaught Error: Call to a member function setContextId() on bool in /home2/gnpueduu/journals.gnpu.edu.ua/lib/pkp/controllers/grid/settings/library/form/NewLibraryFileForm.php:73
Stack trace:
#0 /home2/gnpueduu/journals.gnpu.edu.ua/lib/pkp/controllers/grid/files/LibraryFileGridHandler.php(226): PKP\controllers\grid\settings\library\form\NewLibraryFileForm->execute()
#1 [internal function]: PKP\controllers\grid\files\LibraryFileGridHandler->saveFile()
#2 /home2/gnpueduu/journals.gnpu.edu.ua/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()
#3 /home2/gnpueduu/journals.gnpu.edu.ua/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest()
#4 /home2/gnpueduu/journals.gnpu.edu.ua/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPComponentRouter->route()
#5 /home2/gnpueduu/journals.gnpu.edu.ua/lib/pkp/classes/core/PKPApplication.php(395): PKP\core\Dispatcher->dispatch()
#6 /home2/gnpueduu/journals.gnpu.edu.ua/index.php(21): PKP\core\PKPApplication->execute()
#7 {main}
  thrown in /home2/gnpueduu/journals.gnpu.edu.ua/lib/pkp/controllers/grid/settings/library/form/NewLibraryFileForm.php on line 73

Hi @GNPU,

This is a file permission problem; double-check that OJS has permission to administer the contents of your files_dir (configured in config.inc.php).

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
The folder specified in files_dir has access (755). Files are constantly being created in this folder during the system operation (the date of file creation is recent). There are no problems with other uploads (user avatars, journal’s files).