Hello!
I installed OJS version 3.4.0-5 on the journal website. There’s a problem.
I’m adding articles. When viewing the entire log, everything displays well.
But when I click on the article itself to view only one publication on the page in detail, the page does not open. It gives an HTTP ERROR 500 - The page is unavailable.
PHP error logs
https://openscienceinitiative.org/downloads/php_logs_www.openscienceinitiative.org_2024-06-07
What could be wrong, and how can I fix it?
Hi @a.yurchenko ,
I believe this is the following error:
opened 02:38PM - 09 Apr 24 UTC
closed 03:07PM - 09 Apr 24 UTC
Bug:1:Low
**Describe the bug**
The commit https://github.com/pkp/ojs/commit/00f365eaa507f… 6fa1a4deb164f66c6fe014bf1e6 introduced the regression below:
```php
PHP Fatal error: Uncaught TypeError: APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin::buildTemplate(): Argument #1 ($templateManager) must be of type APP\template\TemplateManager, Smarty_Internal_Template given, called in plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin.php on line 47 and defined in plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin.php:59
Stack trace:
#0 plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin.php(47): APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin->buildTemplate(Object(Smarty_Internal_Template))
#1 [internal function]: APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin->APP\plugins\generic\recommendBySimilarity\{closure}('Templates::Arti...', Array)
#2 lib\pkp\classes\plugins\Hook.php(139): call_user_func_array(Object(Closure), Array)
#3 lib\pkp\classes\plugins\Hook.php(113): PKP\plugins\Hook::run('Templates::Arti...', Array)
#4 lib\pkp\classes\template\PKPTemplateManager.php(1782): PKP\plugins\Hook::call('Templates::Arti...', Array)
#5 cache\t_compile\42362804174f266c598cdb32c3208fc745b92101^1c372c95cd85572e0fbc9a53d0323a0b229cfc78_0.app.frontendpagesarticle.tpl.php(43): PKP\template\PKPTemplateManager->smartyCallHook(Array, Object(Smarty_Internal_Template))
#6 lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_template_resource_base.php(123): content_66154f0d1ddd65_21969434(Object(Smarty_Internal_Template))
#7 lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#8 lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#9 lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_internal_templatebase.php(238): Smarty_Internal_Template->render(false, 1)
#10 lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, '42362804174f266...', NULL, 1)
#11 lib\pkp\classes\template\PKPTemplateManager.php(1367): Smarty_Internal_TemplateBase->display('frontend/pages/...', NULL, '42362804174f266...', NULL)
#12 pages\article\ArticleHandler.php(355): PKP\template\PKPTemplateManager->display('frontend/pages/...')
#13 [internal function]: APP\pages\article\ArticleHandler->view(Array, Object(APP\core\Request))
#14 lib\pkp\classes\core\PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request))
#15 lib\pkp\classes\core\PKPPageRouter.php(277): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array, false)
#16 lib\pkp\classes\core\Dispatcher.php(165): PKP\core\PKPPageRouter->route(Object(APP\core\Request))
#17 lib\pkp\classes\core\PKPApplication.php(388): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#18 index.php(21): PKP\core\PKPApplication->execute()
#19 {main}
thrown in plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin.php on line 59
```
**To Reproduce**
1. Enable the Recommend by similarity plugin
2. Access an article
**What application are you using?**
OJS 3.4
It’s already been fixed in Github, but not yet released. You can fix it in your installation by either disabling assertions in your PHP configuration, or disabling the “recommend by similarity” plugin, or by appying the stable-3_4_0
commit at this link .
Regards,
Alec Smecher
Public Knowledge Project Team
1 Like
Thank you! The problem is fixed. It was exactly that!
Turned off the “recommend by similarity” plugin
1 Like