Plugin Gallery Dont work

#20

I have the same problem. The PlugIn-Gallery ism’t working. I get the same error message: “The uploaded plugin archive does not contain a folder that corresponds to the plugin name.”. allow_url_fopen is on.

Thanks fo your help!

#21

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.

#22

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
#23

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.

#24

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

#25

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

#26

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

#27

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)

#28

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

#29

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
#30

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

#31

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

#32

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.

#33

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}

#34

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

HTTP ERROR 500 after upgrading to OJS 3.1.2
#35

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.

#36

Are these official plugins that haven’t got version.xml file?

#37

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

#38

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

#39

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