Upgrading OJS 3.3.0-14 to 3.4.0-3 Issues

I managed to upgrade from OJS 3.3.0-14 to 3.4.0-3, I mean the command line script returned “success”. However, the website returns error 500 on entering.

In the error log, I see multiple “PHP message: Exception…”, e.g.:

PHP message: Exception: Plugin betterPassword expected to inherit from BetterPasswordPlugin, actual type NULL in …/lib/pkp/classes/plugins/PluginRegistry.php:203\nStack trace:\n#0 …/lib/pkp/classes/plugins/PluginRegistry.php(219): PKP\plugins\PluginRegistry::_instantiatePlugin(‘generic’, ‘betterPassword’, ‘BetterPasswordP…’)\n#1 …/lib/pkp/classes/plugins/PluginRegistry.php(112): PKP\plugins\PluginRegistry::_loadFromDatabase(‘generic’, NULL)\n#2 …/lib/pkp/classes/core/Dispatcher.php(155): PKP\plugins\PluginRegistry::loadCategory(‘generic’, true)\n#3 …/lib/pkp/classes/core/PKPApplication.php(387): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))\n#4 …/index.php(21): PKP\core\PKPApplication->execute()\n#5 {main};

or

PHP message: Exception: Plugin textEditorExtras expected to inherit from TextEditorExtrasPlugin, actual type NULL in …/lib/pkp/classes/plugins/PluginRegistry.php:203\nStack trace:\n#0 …/lib/pkp/classes/plugins/PluginRegistry.php(219): PKP\plugins\PluginRegistry::_instantiatePlugin(‘generic’, ‘textEditorExtra…’, ‘TextEditorExtra…’)\n#1 …/lib/pkp/classes/plugins/PluginRegistry.php(112): PKP\plugins\PluginRegistry::_loadFromDatabase(‘generic’, NULL)\n#2 …/lib/pkp/classes/core/Dispatcher.php(155): PKP\plugins\PluginRegistry::loadCategory(‘generic’, true)\n#3 …/lib/pkp/classes/core/PKPApplication.php(387): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))\n#4 …/index.php(21): PKP\core\PKPApplication->execute()\n#5 {main};

And so on, for a few other plugins.

And I receive one fatal error too:

PHP Fatal error: Uncaught Exception: Invalid product name “navBar_J” in …/lib/pkp/classes/plugins/PluginRegistry.php:186\nStack trace:\n#0 …/lib/pkp/classes/plugins/PluginRegistry.php(219): PKP\plugins\PluginRegistry::_instantiatePlugin(‘blocks’, ‘navBar_J’, ‘NavBar_JBlock…’)\n#1 …/lib/pkp/classes/plugins/PluginRegistry.php(112): PKP\plugins\PluginRegistry::_loadFromDatabase(‘blocks’, NULL)\n#2 …/lib/pkp/classes/template/PKPTemplateManager.php(1440): PKP\plugins\PluginRegistry::loadCategory(‘blocks’, true)\n#3 [internal function]: PKP\template\PKPTemplateManager->displaySidebar(‘Templates::Comm…’, Array)\n#4 …/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array(Array, Array)\n#5 …/lib/pkp/classes/plugins/Hook.php(113): PKP\plug…’

This “navBar_J” refers to custom block I created yet in OJS 2 for a journal in plugins/blocks, and which apparently doesn’t cause any issues in OJS 3.3.0-14 (on the way through different OJS 3.x during subsequent updates), where physically this block hasn’t been used at all, but somehow it is still referenced in DB, as far as I can see in “plugin_settings” and “versions” tables. Can this be removed from DB safely to fix it? I tried changing “enabled” from “1” to “0” directly in DB’s “setting_value” column, but it doesn’t work. There are a few “setting_name” values connected to this “navBar_J” plugin name, such as “context”, “enabled”, and “seq”. “context” is present for two “context_id” values (including for context_id = 0), and in both cases has “1” in “setting_value”.

Thanks.

I had a somewhat similar problem in one of my earlier upgrades. Try uninstalling the two plugins and the custom block, upgrading and then reinstalling these.

Hi @kmnair,

I have removed all entries related to the plugins that were causing fatal errors from DB’s tables “plugin_settings” and “versions” and the website launches. For now I ignored plugins reporting “PHP message: Exception”.

I have noticed that those tables includes references to old plugins (e.g., “stopforumspamplugin” in “plugin_settings” and many others in “versions” table). Is it safe to remove those entries? The “stopforumspamplugin” has “enabled” set to “1”, although the plugin itself doesn’t seem to exist on the plugins list.

I hope you are upgrading on a test site. Otherwise create a test site first for doing this upgradation and then apply in the production site once the upgraded test site works without problems.

I would suggest you reapply all the older plugins also, upgrade them to their latest versions, then uninstall them and proceed. Some the pugins in their initial versions may give problems when uninstalled (leaving traces, without getting fully uninstalled). This problem may get solved in their more mature versions.

I try not to meddle with the database directly. Not that much aware about the DB structure and interdepencies. Perhaps some of the developers in this group can answer your direct question.

Sure it’s a test environment. Now I have better knowledge about about the update process. But it would be great that newer OJS versions did better it terms of cleaning after the older ones.