Unable to reinstall the plugin again (Already installed error)

Application Version - OJS 3.1.2
Description of issue - I had installed the Shariff social media sharing plugin into OJS. By mistake I enabled it for the index site which resulted in my website getting down with a 500 error. I then removed the plugin from the plugins\generic folder. Now when I am trying to install the plugin again from the backend, I get an error that “Plugin is already installed, but can be upgraded to a newer version” even though I have removed the plugin folder completely.

I suspect there are some database entries created by the plugin which might be causing this but not sure where to look at. I also tried uploading the folder manually to the plugins/generic folder, but it again takes my site down with a 500 error as the plugin settings are still saved somewhere.

Error logs: [Tue Oct 13 08:17:51.198840 2020] [:error] [pid 25829] [client 109.177.14.16:64582] PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /var/www/html/plugins/generic/shariff/ShariffPlugin.inc.php:42\nStack trace:\n#0 /var/www/html/lib/pkp/classes/plugins/PluginRegistry.inc.php(65): ShariffPlugin->register('generic', 'plugins/generic...', NULL)\n#1 /var/www/html/lib/pkp/classes/plugins/PluginRegistry.inc.php(138): PluginRegistry::register('generic', Object(ShariffPlugin), 'plugins/generic...', NULL)\n#2 /var/www/html/lib/pkp/classes/core/Dispatcher.inc.php(132): PluginRegistry::loadCategory('generic', true)\n#3 /var/www/html/lib/pkp/classes/core/PKPApplication.inc.php(252): Dispatcher->dispatch(Object(Request))\n#4 /var/www/html/index.php(68): PKPApplication->execute()\n#5 {main}\n thrown in /var/www/html/plugins/generic/shariff/ShariffPlugin.inc.php on line 42Capture

Link to the plugin: Release Shariff Plugin for OJS versions 3.1.1/3.1.2 and OMP version 3.1.2 · ojsde/shariff · GitHub

Hi @sushantv,

Look for an entry for the plugin in the versions table. (Make sure to take a good backup before working with the database manually.)

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi Alec. Thanks for taking your time your time to respond back. I actually deleted the entry from the versions table and even in the plugins_settings table but even then I am getting this same issue.

Hi @sushantv,

Have you removed the plugin from both the versions table and plugins/generic/shariff in your filesystem? Those are the only two places the plugin should be “installed”.

Regards,
Alec Smecher
Public Knowledge Project Team