OJS 3.4 : PKPTemplateManager issue on line 1427

Hi everybody,
This is my first post, thanks for your kindness.

Describe the issue or problem
After updating to 3.4.0.1 to 3.4.0.5 I have an issue (error 500) when I read an article.

Steps I took leading up to the issue
For example:

  1. Go to home
  2. Click on any article title
  3. See error :
    Fatal error : Uncaught AssertionError: assert($request instanceof PKPRequest) in /home/rehabjd/ojs/lib/pkp/classes/template/PKPTemplateManager.php:1427 Stack trace: #0 /home/rehabjd/ojs/lib/pkp/classes/template/PKPTemplateManager.php(1427): assert(false, ‘assert($request…’) #1 /home/rehabjd/ojs/plugins/generic/recommendBySimilarity/RecommendBySimilarityPlugin.php(61): PKP\template\PKPTemplateManager::getManager(Object(Smarty_Internal_Template)) #2 /home/rehabjd/ojs/plugins/generic/recommendBySimilarity/RecommendBySimilarityPlugin.php(47): APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin->buildTemplate(Object(Smarty_Internal_Template)) #3 [internal function]: APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin->APP\plugins\generic\recommendBySimilarity{closure}(‘Templates::Arti…’, Array) #4 /home/rehabjd/ojs/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array(Object(Closure), Array) #5 /home/rehabjd/ojs/lib/pkp/classes/plugins/Hook.php(113): PKP\plugins\Hook::run(‘Templates::Arti…’, Array) #6 /home/rehabjd/ojs/lib/pkp/classes/template/PKPTemplateManager.php(1783): PKP\plugins\Hook::call(‘Templates::Arti…’, Array) #7 /home/rehabjd/ojs/cache/t_compile/42362804174f266c598cdb32c3208fc745b92101^1c372c95cd85572e0fbc9a53d0323a0b229cfc78_0.app.frontendpagesarticle.tpl.php(43): PKP\template\PKPTemplateManager->smartyCallHook(Array, Object(Smarty_Internal_Template)) #8 /home/rehabjd/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_661e3f5464d9d5_66344908(Object(Smarty_Internal_Template)) #9 /home/rehabjd/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template)) #10 /home/rehabjd/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template)) #11 /home/rehabjd/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render(false, 1) #12 /home/rehabjd/ojs/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) #13 /home/rehabjd/ojs/lib/pkp/classes/template/PKPTemplateManager.php(1368): Smarty_Internal_TemplateBase->display(‘frontend/pages/…’, NULL, ‘42362804174f266…’, NULL) #14 /home/rehabjd/ojs/pages/article/ArticleHandler.php(355): PKP\template\PKPTemplateManager->display(‘frontend/pages/…’) #15 [internal function]: APP\pages\article\ArticleHandler->view(Array, Object(APP\core\Request)) #16 /home/rehabjd/ojs/lib/pkp/classes/core/PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request)) #17 /home/rehabjd/ojs/lib/pkp/classes/core/PKPPageRouter.php(277): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array, false) #18 /home/rehabjd/ojs/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route(Object(APP\core\Request)) #19 /home/rehabjd/ojs/lib/pkp/classes/core/PKPApplication.php(388): PKP\core\Dispatcher->dispatch(Object(APP\core\Request)) #20 /home/rehabjd/ojs/index.php(21): PKP\core\PKPApplication->execute() #21 {main} thrown in /home/rehabjd/ojs/lib/pkp/classes/template/PKPTemplateManager.php on line 1427

What application are you using?
OJS 3.4.0-5

Additional information
If I put the line 1427 in comment, everything is fine

Any idea?

No Answers,m But I’m getting the same thing, going with your temp solution for now commenting out the line. No idea if it’s important.

The line is an assert() function.

https://www.php.net/manual/fr/function.assert.php

The manual say :

Assertions should be used as a debugging feature only.

So I think there’s no risk to comment it.