[3.5.0.3] Error on install/upgrade plugins through Plugin Gallery (Path cannot be empty)

Hello!

I upgraded an OJS 3.5.0.1 installation to 3.5.0.3 and now I can not install or upgrade plugins through Plugin Gallery.

This is the error:

PHP Fatal error:  Uncaught ValueError: Path cannot be empty in /lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.php:302
Stack trace:
#0 /lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.php(302): SplFileObject->__construct('', 'w')
#1 /lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.php(278): PKP\controllers\grid\plugins\PluginGalleryGridHandler->installPlugin(Array, Object(APP\core\Request), true)
#2 [internal function]: PKP\controllers\grid\plugins\PluginGalleryGridHandler->upgradePlugin(Array, Object(APP\core\Request))
#3 /lib/pkp/classes/core/PKPRouter.php(327): call_user_func(Array, Array, Object(APP\core\Request))
#4 /lib/pkp/classes/core/PKPComponentRouter.php(265): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array)
#5 /lib/pkp/classes/core/Dispatcher.php(157): PKP\core\PKPComponentRouter->route(Object(APP\core\Request))
#6 /lib/pkp/classes/core/PKPApplication.php(429): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#7 /index.php(21): PKP\core\PKPApplication->execute()
#8 {main}
  thrown in /lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.php on line 302

Using php 8.2 on server.

Hi @geniusdesign,

This appears to be caused by the PHP tempnam function failing to create a temporary file on your system. The manual page might give you some indication why that’s happening. It’s invoked here, using PHP’s sys_get_temp_dir function to determine a location; my guess is that PHP isn’t allowed to create files in that directory for some reason.

Regards,
Alec Smecher
Public Knowledge Project Team

This topic was automatically closed after 13 days. New replies are no longer allowed.