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/ AddThisPlugin-
>register('generic', 'plugins/generic...')
#1 /home/respons3/public_html/ojs/lib/pkp/classes/plugins/ 
PluginRegistry::register('generic', Object(AddThisPlugin), 'plugins/generic...')
#2 /home/respons3/public_html/ojs/lib/pkp/classes/controllers/grid/plugins/ 
#3 /home/respons3/public_html/ojs/controllers/grid/settings/plugins/ 
PluginGridHandler->loadCategoryData(Object(Request), 'generic', Array)
#4 /home/respons3/public_html/ojs/lib/pkp/classes/controllers/grid/ 
SettingsPluginGridHandler->loadCategoryData(Object(Request), 'generic', Array)
#5 /home/respons3/public_htm in 
/home/respons3/public_html/ojs/plugins/generic/AddThis/ 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.)

Alec Smecher
Public Knowledge Project Team

Apologies, it’s version

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 
Stack trace:
#0 /home/respons3/public_html/ojs/lib/pkp/controllers/grid/plugins/ 
PluginHelper->upgradePlugin('generic', 'addThis', NULL, 'The uploaded pl...')
#1 /home/respons3/public_html/ojs/lib/pkp/controllers/grid/plugins/ 
PluginGalleryGridHandler->installPlugin(Array, Object(Request), true)
#2 /home/respons3/public_html/ojs/lib/pkp/classes/core/ 
PluginGalleryGridHandler->upgradePlugin(Array, Object(Request))
#3 /home/respons3/public_html/ojs/lib/pkp/classes/core/ PKPRouter-
>_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#4 /home/respons3/public_html/ojs/lib/pkp/classes/core/ PKPComponentRouter-
#5 /home/respons3/public_html/ojs/lib/pkp/classes/core/PKPApplicatio in 
/home/respons3/public_html/ojs/lib/pkp/classes/plugins/ 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.

Alec Smecher
Public Knowledge Project Team