Plugin Gallery Dont work

allow_url_fopen should be in php.ini on your server since if it is Off on your server setting in your config.inc.php will not make change.

I see that medicinaclinica.org is in https regime. Do you have https stream open and set proper enxtension in your php.ini. Find what is written below and enable it if it is not enabled.

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
; ...
;extension=ext/php_oci8.dll
extension=ext/php_openssl.dll         ; <---- you want this
;extension=ext/php_pdo_firebird.dll

Dear @vvucic, thanks for your reply. Yes the settings in the phi.ini are On (See picture). The same in the config file. I donā€™t know where could be the error. May be you have some hints for me.

open

Did you check permissions in that folder? Did you try to install manually?

The Permission is 777 (I change it befor I try to update the PlugIn). Yes manualy there are no problems, thats only the gallery.

Permission should be 755. Permission 777 is unsafe. Files should be permission 644.

Hi @Felixmail2015

Do you have an access to PHP error logs? There should be something there. You should look for those lines that appear just after reproduction of the error (PHP error or PHP Fatal error)

Thanks @Vitaliy for your reply. Itā€™s a fatal error. In the PHP Log I can find this:

PHP Fatal error: Uncaught Error: Call to a member function getProductType() on string in ā€¦/lib/pkp/classes/plugins/PluginHelper.inc.php:107
Stack trace:
#0 ā€¦/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(266): PluginHelper->installPlugin(NULL, ā€˜Das hochgeladenā€¦ā€™)
#1 /ā€¦/lib/pkp/classes/core/PKPRouter.inc.php(390): PluginGalleryGridHandler->installPlugin(Array, Object(Request))
#2 /ā€¦/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#3 /ā€¦/OJS2/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPComponentRouter->route(Object(Request))
#4 /ā€¦2/lib/pkp/classes/core/PKPApplication.inc.php(247): Dispatcher->dispatch(Object(Request))
#5 /ā€¦/index.php(68): PKPApplication->execute()
#6 {main}

Thanks for your help!
Felix

Itā€™s hard for me to say what is happening here. The error occurs when OJS tries to retrieve version of one of the plugins. It seems that you need to check version.xml file for each of them to check where it is missing or invalid. You can see that it contains xml tags, and each of them should have specific value. For example, application should correspond to a pluginā€™s folder name, release - to a current version, class goes for a pluginā€™s main class (php file in the pluginā€™s root). You can find version,xml inside every plugin in the correspondent folder.

Also, Iā€™d check the database. versions table contains this info (major, minorā€¦ columns).

Can you also specify what OJS version you are using and when this error firstly occurred. Perhaps, after installation of a specific plugin?

1 Like

Hi, Im still trying to know why my gallery dont upload plugins.

this is the last error_log

I hope you can see some thing to correct

[05-Dec-2018 01:25:00 UTC] ojs2: 404 Not Found
[05-Dec-2018 01:25:33 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 64
[05-Dec-2018 01:25:33 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 263
[05-Dec-2018 01:25:33 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 359
[05-Dec-2018 01:25:33 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[05-Dec-2018 01:25:33 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[05-Dec-2018 01:25:33 UTC] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/ipao/public_html/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 386
[05-Dec-2018 01:25:33 UTC] PHP Warning: Declaration of TexturePlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /home/ipao/public_html/plugins/generic/texture/TexturePlugin.inc.php on line 141
[05-Dec-2018 01:25:33 UTC] PHP Warning: Declaration of OpenAIREDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /home/ipao/public_html/plugins/generic/openAIRE/OpenAIREDAO.inc.php on line 19
[05-Dec-2018 01:25:33 UTC] PHP Warning: Declaration of DRIVERDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /home/ipao/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 65
[05-Dec-2018 01:25:33 UTC] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/ipao/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134
[05-Dec-2018 01:25:33 UTC] PHP Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/ipao/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134
[05-Dec-2018 01:25:33 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty_Compiler has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty_Compiler.class.php on line 35
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 64
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 263
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 359
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[05-Dec-2018 01:25:46 UTC] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/ipao/public_html/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 386
[05-Dec-2018 01:25:46 UTC] PHP Warning: Declaration of TexturePlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /home/ipao/public_html/plugins/generic/texture/TexturePlugin.inc.php on line 141
[05-Dec-2018 01:25:46 UTC] PHP Warning: Declaration of OpenAIREDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /home/ipao/public_html/plugins/generic/openAIRE/OpenAIREDAO.inc.php on line 19
[05-Dec-2018 01:25:46 UTC] PHP Warning: Declaration of DRIVERDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /home/ipao/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 65
[05-Dec-2018 01:25:46 UTC] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/ipao/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134
[05-Dec-2018 01:25:46 UTC] PHP Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/ipao/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134
[05-Dec-2018 01:25:46 UTC] PHP Warning: Declaration of RegistrationHandler::validate($request) should be compatible with PKPHandler::validate($requiredContexts = NULL, $request = NULL) in /home/ipao/public_html/lib/pkp/pages/user/RegistrationHandler.inc.php on line 19
[05-Dec-2018 01:25:46 UTC] PHP Warning: Declaration of RegistrationHandler::initialize($request, &$args) should be compatible with PKPHandler::initialize($request) in /home/ipao/public_html/lib/pkp/pages/user/RegistrationHandler.inc.php on line 19
[05-Dec-2018 01:25:46 UTC] PHP Warning: Declaration of RegistrationForm::initData($request) should be compatible with Form::initData() in /home/ipao/public_html/lib/pkp/classes/user/form/RegistrationForm.inc.php on line 21
[05-Dec-2018 01:25:46 UTC] PHP Warning: Declaration of RegistrationForm::validate() should be compatible with Form::validate($callHooks = true) in /home/ipao/public_html/lib/pkp/classes/user/form/RegistrationForm.inc.php on line 21
[05-Dec-2018 01:25:46 UTC] PHP Warning: Declaration of RegistrationForm::execute($request) should be compatible with Form::execute() in /home/ipao/public_html/lib/pkp/classes/user/form/RegistrationForm.inc.php on line 21
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Non-static method PKPRequest::getRemoteAddr() should not be called statically in /home/ipao/public_html/lib/pkp/classes/user/form/RegistrationForm.inc.php on line 59
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically in /home/ipao/public_html/lib/pkp/classes/core/PKPRequest.inc.php on line 425
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Non-static method PKPRequest::getUserVar() should not be called statically in /home/ipao/public_html/lib/pkp/classes/form/Form.inc.php on line 369
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically in /home/ipao/public_html/lib/pkp/classes/core/PKPRequest.inc.php on line 592
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Non-static method Request::getContext() should not be called statically in /home/ipao/public_html/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php on line 141
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically in /home/ipao/public_html/classes/core/Request.inc.php on line 68
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Non-static method Request::getContext() should not be called statically in /home/ipao/public_html/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php on line 120
[05-Dec-2018 01:25:46 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically in /home/ipao/public_html/classes/core/Request.inc.php on line 68
thank you

I confirm we still have problems installing and upgrading plugins through the plugin gallery in OJS 3.1.1.4 too.

Hi @luismurillo

Sorry, havenā€™t seen this earlier. Those warning are cosmetic and can be ignored. Can you point the OJS version that you are using and the problem that you have encountered in more details, e.g., on what stage the issue occurs and how have you tried to upload plugins.

Furthermore, I have the problem with the Plugin Gallery. I get farther the same Uncaught Error and I donā€™t know why. Maybe you can help me. I use OJS 3.1.2 and PHP 7.3 Maybe you can help me.

PHP Fatal error: Uncaught Error: Call to a member function getProductType() on string in ā€¦/lib/pkp/classes/plugins/PluginHelper.inc.php:107
Stack trace:
#0 ā€¦/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(266): PluginHelper->installPlugin(NULL, ā€˜Das hochgeladenā€¦ā€™)
#1 /ā€¦/lib/pkp/classes/core/PKPRouter.inc.php(390): PluginGalleryGridHandler->installPlugin(Array, Object(Request))
#2 /ā€¦/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#3 /ā€¦/OJS2/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPComponentRouter->route(Object(Request))
#4 /ā€¦2/lib/pkp/classes/core/PKPApplication.inc.php(247): Dispatcher->dispatch(Object(Request))
#5 /ā€¦/index.php(68): PKPApplication->execute()
#6 {main}

It seems that OJS tries to install a plugin but cannot find all of its version information that is usually stored in version.xml file inside pluginā€™s directory. Can you double check if all your plugins have product type specified, e.g.: https://github.com/pkp/ojs/blob/master/plugins/generic/dublinCoreMeta/version.xml#L15

Thanks for your reply. Itā€™s a need, that the version.xml have the lazy load information. Because a lot of PlugIns havenā€™t it.

Are these official plugins that havenā€™t got version.xml file?

Dear Vitaliy,

no all PlugIns have a version.xml but some havenā€™t inside the ā€œlazy loadā€-Tag inside the version.xml . Is this correct? For example the PlugIn usageEvent havenā€™t ā€œlazy loadā€ and havenā€™t ā€œclassā€.

The importExport-PlugIn Native havenā€™t a version.xml

Ho @Felixmail2015,

You are receiving this error:

when trying to install a plugin, right?
If yes, let me know about the plugin you trying install.
If no, can you specify what you see on the line 107 of the PluginHelper class. Iā€™m expecting there this line: https://github.com/pkp/pkp-lib/blob/master/classes/plugins/PluginHelper.inc.php#L113

Hello @Vitaliy,

thanks a lot for your help. Yes I receiving the error, when I trying to install a plugin from the plugIn-Gallery. The plugin is not specific, the error is generated for every plugin in the gallery.

My linie 107 in the PlugInHelper class is

$versionFile = $path . ā€˜/ā€™ . PLUGIN_VERSION_FILE;

thats the same like in the gitHub thing.

Iā€™m not realy sure if the error rely generated from a false PlugIn version.xml. I was installing a new OJS 3.1.2. for testing on the same server in a different direction with a different database and I get the same error. Could it be, that the PlugIn-gallery need Node.js? Because I canā€™t install Node.js on my server.

Thanks a lot for your help.

Felix

Hi again, Iā€™m still having problem with the plugin gallery. this is my log. Hope you can help.

[12-Jun-2019 14:47:59 UTC] PHP Fatal error: Uncaught Error: Call to a member function getProductType() on string in /home/ipao/public_html/lib/pkp/classes/plugins/PluginHelper.inc.php:113
Stack trace:
#0 /home/ipao/public_html/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(266): PluginHelper->installPlugin(NULL, ā€˜The uploaded plā€¦ā€™)
#1 /home/ipao/public_html/lib/pkp/classes/core/PKPRouter.inc.php(390): PluginGalleryGridHandler->installPlugin(Array, Object(Request))
#2 /home/ipao/public_html/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#3 /home/ipao/public_html/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPComponentRouter->route(Object(Request))
#4 /home/ipao/public_html/lib/pkp/classes/core/PKPApplication.inc.php(252): Dispatcher->dispatch(Object(Request))
#5 /home/ipao/public_html/index.php(67): PKPApplication->execute()
#6 {main}
thrown in /home/ipao/public_html/lib/pkp/classes/plugins/PluginHelper.inc.php on line 113
[12-Jun-2019 14:48:39 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 263
[12-Jun-2019 14:48:39 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 359
[12-Jun-2019 14:48:39 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[12-Jun-2019 14:48:39 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[12-Jun-2019 14:48:40 UTC] PHP Warning: Declaration of BrowsePlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /home/ipao/public_html/plugins/generic/browse/BrowsePlugin.inc.php on line 223
[12-Jun-2019 14:48:40 UTC] PHP Warning: Declaration of DocxToJatsPlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /home/ipao/public_html/plugins/generic/docxConverter/DocxToJatsPlugin.inc.php on line 122
[12-Jun-2019 14:48:41 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbObject has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 106
[12-Jun-2019 14:48:41 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbTable has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 205
[12-Jun-2019 14:48:41 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbIndex has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 613
[12-Jun-2019 14:48:41 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbData has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 774
[12-Jun-2019 14:48:41 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbQuerySet has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 959
[12-Jun-2019 14:48:41 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; adoSchema has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 1217
[12-Jun-2019 14:48:41 UTC] PHP Warning: exec() has been disabled for security reasons in /home/ipao/public_html/lib/pkp/classes/plugins/PluginHelper.inc.php on line 67
[12-Jun-2019 14:48:41 UTC] PHP Fatal error: Uncaught Error: Call to a member function getProductType() on string in /home/ipao/public_html/lib/pkp/classes/plugins/PluginHelper.inc.php:113
Stack trace:
#0 /home/ipao/public_html/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(266): PluginHelper->installPlugin(NULL, ā€˜The uploaded plā€¦ā€™)
#1 /home/ipao/public_html/lib/pkp/classes/core/PKPRouter.inc.php(390): PluginGalleryGridHandler->installPlugin(Array, Object(Request))
#2 /home/ipao/public_html/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#3 /home/ipao/public_html/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPComponentRouter->route(Object(Request))
#4 /home/ipao/public_html/lib/pkp/classes/core/PKPApplication.inc.php(252): Dispatcher->dispatch(Object(Request))
#5 /home/ipao/public_html/index.php(67): PKPApplication->execute()
#6 {main}
thrown in /home/ipao/public_html/lib/pkp/classes/plugins/PluginHelper.inc.php on line 113