Upgrade failed due to Most Read block plugin [OJS-3.3.0-14 to OJS-3.4.0-1] (HTTP ERROR 500)

OJS-3.4.0-1
PHP-8.1 & PHP-8.2

Most Read Block Plugin not working (HTTP ERROR 500)
Screenshot 2023-07-31 155851

Error log

PHP Fatal error:  Uncaught Error: Class "APP\statistics\MetricsDAO" not found in F:\wamp64\www\ojs3401\lib\pkp\classes\db\DAORegistry.php:81
Stack trace:
#0 F:\wamp64\www\ojs3401\plugins\blocks\mostRead\MostReadBlockPlugin.inc.php(102): PKP\db\DAORegistry::getDAO('MetricsDAO')
#1 F:\wamp64\www\ojs3401\lib\pkp\classes\template\PKPTemplateManager.php(1447): MostReadBlockPlugin->getContents(Object(Smarty_Internal_Template), Object(APP\core\Request))
#2 [internal function]: PKP\template\PKPTemplateManager->displaySidebar('Templates::Comm...', Array)
#3 F:\wamp64\www\ojs3401\lib\pkp\classes\plugins\Hook.php(140): call_user_func_array(Array, Array)
#4 F:\wamp64\www\ojs3401\lib\pkp\classes\plugins\Hook.php(113): PKP\plugins\Hook::run('Templates::Comm...', Array)
#5 F:\wamp64\www\ojs3401\lib\pkp\classes\template\PKPTemplateManager.php(1740): PKP\plugins\Hook::call('Templates::Comm...', Array)
#6 F:\wamp64\www\ojs3401\cache\t_compile\00a0a0910209607cb33eb0fe6474f30ed7399ed7^4dffb64063bb972c37e05619a2ccd9d0ea7473ac_0.app.frontendcomponentsfooter.tpl.php(29): PKP\template\PKPTemplateManager->smartyCallHook(Array, Object(Smarty_Internal_Template))
#7 F:\wamp64\www\ojs3401\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_template_resource_base.php(123): content_64c0dee3073034_06272405(Object(Smarty_Internal_Template))
#8 F:\wamp64\www\ojs3401\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#9 F:\wamp64\www\ojs3401\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#10 F:\wamp64\www\ojs3401\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_internal_template.php(386): Smarty_Internal_Template->render()
#11 F:\wamp64\www\ojs3401\cache\t_compile\00a0a0910209607cb33eb0fe6474f30ed7399ed7^e64e579388e5615e11e939b12134d6ae8679eba6_0.app.frontendpagesindexJournal.tpl.php(130): Smarty_Internal_Template->_subTemplateRender('app:frontend/co...', NULL, '00a0a0910209607...', 0, 3600, Array, 0, false)
#12 F:\wamp64\www\ojs3401\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_template_resource_base.php(123): content_64c0dee0939413_86289303(Object(Smarty_Internal_Template))
#13 F:\wamp64\www\ojs3401\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#14 F:\wamp64\www\ojs3401\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#15 F:\wamp64\www\ojs3401\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_internal_templatebase.php(238): Smarty_Internal_Template->render(false, 1)
#16 F:\wamp64\www\ojs3401\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, '00a0a0910209607...', NULL, 1)
#17 F:\wamp64\www\ojs3401\lib\pkp\classes\template\PKPTemplateManager.php(1325): Smarty_Internal_TemplateBase->display('frontend/pages/...', NULL, '00a0a0910209607...', NULL)
#18 F:\wamp64\www\ojs3401\pages\index\IndexHandler.php(80): PKP\template\PKPTemplateManager->display('frontend/pages/...')
#19 [internal function]: APP\pages\index\IndexHandler->index(Array, Object(APP\core\Request))
#20 F:\wamp64\www\ojs3401\lib\pkp\classes\core\PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request))
#21 F:\wamp64\www\ojs3401\lib\pkp\classes\core\PKPPageRouter.php(277): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array, false)
#22 F:\wamp64\www\ojs3401\lib\pkp\classes\core\Dispatcher.php(165): PKP\core\PKPPageRouter->route(Object(APP\core\Request))
#23 F:\wamp64\www\ojs3401\lib\pkp\classes\core\PKPApplication.php(373): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#24 F:\wamp64\www\ojs3401\index.php(21): PKP\core\PKPApplication->execute()
#25 {main}
  thrown in F:\wamp64\www\ojs3401\lib\pkp\classes\db\DAORegistry.php on line 81

Hi @shantanusingh,

It doesn’t look like that plugin has been updated to be compatible with OJS 3.4.

-Roger
PKP Team

Any plans for compatibility for OJS-3.4.

Hi @shantanusingh,

@ajnyga - is the plugin developer - he would have the best sense of this - @ajnyga - can you speak to this?

-Roger
PKP Team

Hi @ajnyga

Because of this plugin, I am not able to upgrade and sometimes if the upgrade is successful it is showing HTTP ERROR 500.

@rcgillis Can you suggest how to remove this plugin before upgrading from the database? We have over 20 Journals.

Hi @shantanusingh,

Can you disable it from the plugin gallery? Does that make a difference?

-Roger
PKP Team

Hi @rcgillis @ajnyga

I have disabled MostRead Plugin from all Journals and tried to upgrade but the upgrade failed because of MostRead Plugin.

I have already raised this issue on OJS-3.3.0-14 to OJS-3.4.0-1 upgradation error link.

Do you have any suggestions for correcting this please suggest.

Hi @shantanusingh,

Sorry - I’m not sure what to suggest here.

-Roger
PKP Team

Disable the plugin from the journals and delete the plugin version from the database.