[OJS 3.1.1.2] Issue when try to install a plugin from plugin gallery

Hi all!

I trying to install plugins on OJS 3.1.1.2 from the plugin gallery but nothing happens.
When I click on one and click the ‘install’ button, nothing happens.

I’d check the log and get this error:

[Thu Nov 22 11:58:24.654251 2018] [:error] [pid 14244:tid 2060] [client ::1:58149] PHP Fatal error: Call to a member function getProductType() on string in C:\xampp\htdocs\ojs\lib\pkp\classes\plugins\PluginHelper.inc.php on line 107, referer: http://localhost/ojs/index.php/journal1/management/settings/website

Thank you in advance.

Hi @madileweb,

Only a user with an Administrator role can install plugins in OJS 3.x. Do you have an Administrator role?

Thanks,
Amanda Stevens
Public Knowledge Project Team

Hi @astevens,
I’m testing ojs-312-3 on windows and I’m getting the same error. I am have site and journal admin role

Here the stack trace

[07-Dec-2019 17:34:57 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getProductType() on string in C:\wamp64\www\ojs-312-3\lib\pkp\classes\plugins\PluginHelper.inc.php:204
Stack trace:
#0 C:\wamp64\www\ojs-312-3\lib\pkp\controllers\grid\plugins\PluginGalleryGridHandler.inc.php(287): PluginHelper->upgradePlugin('generic', 'openAIRE', NULL, 'The tar command...')
#1 C:\wamp64\www\ojs-312-3\lib\pkp\controllers\grid\plugins\PluginGalleryGridHandler.inc.php(236): PluginGalleryGridHandler->installPlugin(Array, Object(Request), true)
#2 C:\wamp64\www\ojs-312-3\lib\pkp\classes\core\PKPRouter.inc.php(390): PluginGalleryGridHandler->upgradePlugin(Array, Object(Request))
#3 C:\wamp64\www\ojs-312-3\lib\pkp\classes\core\PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#4 C:\wamp64\www\ojs-312-3\lib\pkp\classes\core\Dispatcher.inc.php(134): PKPComponentRouter->route(Object(Request))
#5 C:\wamp64\www\ojs-312-3\lib\pkp\classes\core\PKPApplication.inc.php(252): Dispatcher->dispatch(Object(Requ in C:\wamp64\www\ojs-312-3\lib\pkp\classes\plugins\PluginHelper.inc.php on line 204

Thanks,
andrea

Hi @marchitelli,

Do you get this error when you try to install any plugin from the gallery or just one particular plugin?

Thanks,
Amanda Stevens
Public Knowledge Project Team

1 Like

Hello @astevens,
it’s happening wiht any plugin in the plugin gallery

Hi @astevens and @marchitelli. Still having the same problem with admin user and the issue continue installing whatever plugin.

Regards,
Diego

Hi @madileweb and @marchitelli,

Is the path to the tar utility correct in the config file?

Hi @Vitaliy. Probably no, I don’t know what to put there.

The exact path dependence on the server operating system and specifications. This is a default location for Linux systems. If it’s shared hosting, you can ask your provider.

tar is responsible for unpacking archived plugins, thus I think it’s better to ensure that the system has the correct path to it.

1 Like

Thanks for information @Vitaliy. I’ll try.

Regards,
Diego

I have the same problem. Managed to solve?

Hi…

Aquí publiqué una posible solución: Configuración Comando tar - #12 by David_Alarcon_davidy

1 Like