ajnyga / mostRead

OJS Most Read Articles block plugin
GNU General Public License v3.0
2 stars 15 forks source link

Most Read Block Plugin not working (HTTP ERROR 500) #23

Closed shantanu198713 closed 2 months ago

shantanu198713 commented 1 year ago

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

Most Read Block Plugin not working (HTTP ERROR 500)

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
ajnyga commented 2 months ago

Hi, The current master branch should be 3.4 compatible.