Trying to install the AddThis plugin

Hi there,

So I downloaded the AddThis plugin from the github, extracted the folder and renamed it to AddThis. Uploaded it to /plugins/generic and these are the errors im receiving in the log

#0 /home/respons3/public_html/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php(64): AddThisPlugin-
>register('generic', 'plugins/generic...')
#1 /home/respons3/public_html/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php(135): 
PluginRegistry::register('generic', Object(AddThisPlugin), 'plugins/generic...')
#2 /home/respons3/public_html/ojs/lib/pkp/classes/controllers/grid/plugins/PluginGridHandler.inc.php(155): 
PluginRegistry::loadCategory('generic')
#3 /home/respons3/public_html/ojs/controllers/grid/settings/plugins/SettingsPluginGridHandler.inc.php(36): 
PluginGridHandler->loadCategoryData(Object(Request), 'generic', Array)
#4 /home/respons3/public_html/ojs/lib/pkp/classes/controllers/grid/CategoryGridHandler.inc.php(124): 
SettingsPluginGridHandler->loadCategoryData(Object(Request), 'generic', Array)
#5 /home/respons3/public_htm in 
/home/respons3/public_html/ojs/plugins/generic/AddThis/AddThisPlugin.inc.php on line 31

I’ve tried addThis and AddThis as folder names, and when I try to install the plugin via the admin (available plugins section) I receive the following error …

The uploaded plugin archive does not contain a folder that corresponds to the plugin name.

Many thanks

Hi @keeno79,

I think you’ve left the error message out of the log quotation above – it should be just above the first line of the stack trace (which starts with #0).

Also, it looks like you’re using OJS – what version? (Please post this with your questions.)

Regards,
Alec Smecher
Public Knowledge Project Team

Apologies, it’s version 3.1.0.1

The error message is …

[26-Feb-2018 20:43:17 Europe/London] PHP Fatal error:  Uncaught Error: Call to a member function 
getProductType() on string in 
/home/respons3/public_html/ojs/lib/pkp/classes/plugins/PluginHelper.inc.php:196
Stack trace:
#0 /home/respons3/public_html/ojs/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(270): 
PluginHelper->upgradePlugin('generic', 'addThis', NULL, 'The uploaded pl...')
#1 /home/respons3/public_html/ojs/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(236): 
PluginGalleryGridHandler->installPlugin(Array, Object(Request), true)
#2 /home/respons3/public_html/ojs/lib/pkp/classes/core/PKPRouter.inc.php(372): 
PluginGalleryGridHandler->upgradePlugin(Array, Object(Request))
#3 /home/respons3/public_html/ojs/lib/pkp/classes/core/PKPComponentRouter.inc.php(256): PKPRouter-
>_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#4 /home/respons3/public_html/ojs/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPComponentRouter-
>route(Object(Request))
#5 /home/respons3/public_html/ojs/lib/pkp/classes/core/PKPApplicatio in 
/home/respons3/public_html/ojs/lib/pkp/classes/plugins/PluginHelper.inc.php on line 196

Hi @keeno79,

Did you download the plugin from the Releases page? If not, you’re probably working with pre-release code that hasn’t been packaged appropriately. It should also be in the Plugin Gallery, where you can install it directly.

Regards,
Alec Smecher
Public Knowledge Project Team