I want to install two plugins: OAI JATS and JATS Template by @asmecher using Plugin Gallery. Both plugins (and most others) have a note next to them that they can be upgraded. I don’t think I have these two plugins installed at all, to start with, but hey. I click on Some of them show that they can be upgraded. I click on the plugin, then Upgrade, then OK and nothing happens.
I am using XAMPP on Windows, which does not come with tar by default, so I first read countless posts where people got “The tar command is not available”. Looked at php_error_log and found this:
PHP Fatal error: Uncaught Error: Call to a member function getProductType() on string in C:\xampp\htdocs\journal\lib\pkp\classes\plugins\PluginHelper.inc.php:204
#0 C:\xampp\htdocs\journal\lib\pkp\controllers\grid\plugins\PluginGalleryGridHandler.inc.php(287): PluginHelper->upgradePlugin(‘oaiMetadataForm…’, ‘oaiJats’, NULL, ‘The tar command…’)
#1 C:\xampp\htdocs\journal\lib\pkp\controllers\grid\plugins\PluginGalleryGridHandler.inc.php(236): PluginGalleryGridHandler->installPlugin(Array, Object(Request), true)
#2 C:\xampp\htdocs\journal\lib\pkp\classes\core\PKPRouter.inc.php(390): PluginGalleryGridHandler->upgradePlugin(Array, Object(Request))
#3 C:\xampp\htdocs\journal\lib\pkp\classes\core\PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#4 C:\xampp\htdocs\journal\lib\pkp\classes\core\Dispatcher.inc.php(134): PKPComponentRouter->route(Object(Request))
#5 C:\xampp\htdocs\journal\lib\pkp\classes\core\PKPApplication.inc.php(252): Dispatcher->dispatch(O in C:\xampp\htdocs\journal\lib\pkp\classes\plugins\PluginHelper.inc.php on line 204
I then installed GnuWin32 with tar in it, added it to Windows’ PATH, ran it in command prompt to untar -xvf oaiJats-v1_0_1-0.tar.gz into a folder. Tar seems to be working fine. Then I went to config.inc.php and set:
tar = “C:/GnuWin32/bin/tar.exe”
Now, when I try to upgrade/install a plugin in Plugin Gallery, nothing happens still, but the error message has changed. While stack trace lines #1-5 stay the same, the line #0 now reads:
#0 C:\xampp\htdocs\journal\lib\pkp\controllers\grid\plugins\PluginGalleryGridHandler.inc.php(287): PluginHelper->upgradePlugin(‘oaiMetadataForm…’, ‘oaiJats’, NULL, ‘No file uploade…’)
That error comes from common.xml, where it reads:
No file uploaded or invalid file type!
So, I am stuck here. Any help will be most welcome!