Hello there,
I’m very sorry to bother you again. I haven’t found anything about this problem either in the forum or in github, so I think maybe this isn’t known yet. Anyway I noticed that if I activate the “Recommend Articles by Author”-Plugin in OJS 3.2.0-1 it only works if every article the author has written is published. If one article isn’t publish yet, I receive this error:
PHP Fatal error: Uncaught Error: Call to a member function getJournalId() on null in C:\xampp\htdocs\ojs3\classes\issue\IssueAction.inc.php:31\nStack trace:\n#0 C:\xampp\htdocs\ojs3\classes\search\ArticleSearch.inc.php(274): IssueAction->subscriptionRequired(NULL, Object(Journal))\n#1 C:\xampp\htdocs\ojs3\plugins\generic\recommendByAuthor\RecommendByAuthorPlugin.inc.php(137): ArticleSearch->formatResults(Array)\n#2 C:\xampp\htdocs\ojs3\lib\pkp\classes\plugins\HookRegistry.inc.php(107): RecommendByAuthorPlugin->callbackTemplateArticlePageFooter(‘Templates::Arti…’, Array)\n#3 C:\xampp\htdocs\ojs3\lib\pkp\classes\template\PKPTemplateManager.inc.php(1237): HookRegistry::call(‘Templates::Arti…’, Array)\n#4 C:\xampp\htdocs\ojs3\cache\t_compile\42362804174f266c598cdb32c3208fc745b92101^1c372c95cd85572e0fbc9a53d0323a0b229cfc78_0.app.frontendpagesarticle.tpl.php(43): PKPTemplateManager->smartyCallHook(Array, Object(Smarty_Internal_Template))\n#5 C:\xampp\htdocs\ojs3\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_template_resource in C:\xampp\htdocs\ojs3\classes\issue\IssueAction.inc.php on line 31
Edit: I noticed it’s enough to add the article to an issue, but you don’t have to publish it. Anyway, the problem remains that articles without having an issue lead to this error.
Kind regards
Daniela