How to Fix getJournalId() return NULL

I’ve many Journal site than we need to install the “Most Read Plugin”. After installing, I activate the plugin in some Journal Site and work perfectly. But, in one Journal I got 500 Internal Server Error than I check to Php log and got this errors

PHP Fatal error: Uncaught Error: Call to a member function getJournalId() on null in /var/www/html/plugins/blocks/mostRead/MostReadBlockPlugin.inc.php:155\nStack trace:\n
#0 /var/www/html/lib/pkp/classes/cache/GenericCache.inc.php(63): MostReadBlockPlugin->_cacheMiss(Object(FileCache), NULL)\n
#1 /var/www/html/lib/pkp/classes/cache/FileCache.inc.php(115): GenericCache->get(NULL)\n
#2 /var/www/html/plugins/blocks/mostRead/MostReadBlockPlugin.inc.php(108): FileCache->getContents()\n
#3 /var/www/html/lib/pkp/classes/plugins/BlockPlugin.inc.php(177): MostReadBlockPlugin->getContents(Object(Smarty_Internal_Template), Object(Request))\n
#4 /var/www/html/lib/pkp/classes/plugins/HookRegistry.inc.php(107): BlockPlugin->callback(‘Templates::Comm…’, Array)\n
#5 /var/www/html/lib/pkp/classes/template/PKPTemplateManager.inc.php(1116): HookRegistry::call(‘Templates::Comm…’, Array)\n
#6 /var/www/html/cache/t_compile/b9da708b775ca192cb9735589afa7e98b537357a^4dffb64063bb972c37e05619a2ccd9d0ea7473ac_0.app.frontendcomponentsfooter. in /var/www/html/plugins/blocks/mostRead/MostReadBlockPlugin.inc.php on line 155

At first row I got PHP Fatal error: Uncaught Error: Call to a member function getJournalId() on null how to fix this error? because in other Journals work so well

Thank’s for everyone help me :sob:

Hi @evotihore,

I’d suggest contacting the author of that plugin.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

okay, thanks for your answer :sob: