Failed to display published article page after a successful upgrade from OJS 3.3.0-15 to 3.4.0-3

Hi,
I got 500 http error when I try to access published article pages. Click on the link below to see a sample:
https://journal.uokufa.edu.iq/test/index.php/kmj/article/view/10651

I tried to look through (plugins/themes/default/DefaultThemePlugin.php) file and have noticed their is an error in line 15 as you can see below :

Error file logs says

[16-Oct-2023 11:22:08 UTC] PHP Warning:  Trying to access array offset on value of type null in public_html/test/plugins/themes/default/DefaultThemePlugin.php on line 188
[16-Oct-2023 11:22:11 UTC] PHP Fatal error:  Uncaught Exception: Deprecated call without request object. in /public_html/test/lib/pkp/classes/template/PKPTemplateManager.php:1381
Stack trace:
#0 public_html/test/plugins/generic/recommendBySimilarity/RecommendBySimilarityPlugin.php(60): PKP\template\PKPTemplateManager::getManager()
#1 /public_html/test/plugins/generic/recommendBySimilarity/RecommendBySimilarityPlugin.php(46): APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin->buildTemplate()
#2 [internal function]: APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin->APP\plugins\generic\recommendBySimilarity\{closure}('Templates::Arti...', Array)
#3 /public_html/test/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array(Object(Closure), Array)
#4 /public_html/test/lib/pkp/classes/plugins/Hook.php(113): PKP\plugins\Hook::run('Templates::Arti...', Array)
#5 /public_html/test/lib/pkp/classes/template/PKPTemplateManager.php(1740): PKP\plugins\Hook::call('Templates::Arti...', Array)
#6 /public_html/test/cache/t_compile/42362804174f266c598cdb32c3208fc745b92101^1c372c95cd85572e0fbc9a53d0323a0b229cfc78_0.app.frontendpagesarticle.tpl.php(43): PKP\template\PKPTemplateManager->smartyCallHook(Array, Object(Smarty_Internal_Template))
#7 /public_html/test/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_652d1ce3453b14_65608242(Object(Smarty_Internal_Template))
#8 /public_html/test/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#9 /public_html/test/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#10 /public_html/test/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render(false, 1)
#11 /public_html/test/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)
#12 /public_html/test/lib/pkp/classes/template/PKPTemplateManager.php(1325): Smarty_Internal_TemplateBase->display('frontend/pages/...', NULL, '42362804174f266...', NULL)
#13 /public_html/test/pages/article/ArticleHandler.php(355): PKP\template\PKPTemplateManager->display('frontend/pages/...')
#14 [internal function]: APP\pages\article\ArticleHandler->view(Array, Object(APP\core\Request))
#15 /public_html/test/lib/pkp/classes/core/PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request))
#16 /public_html/test/lib/pkp/classes/core/PKPPageRouter.php(277): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array, false)
#17 /public_html/test/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route(Object(APP\core\Request))
#18 /public_html/test/lib/pkp/classes/core/PKPApplication.php(387): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#19 /public_html/test/index.php(21): PKP\core\PKPApplication->execute()
#20 {main}
  thrown in /public_html/test/lib/pkp/classes/template/PKPTemplateManager.php on line 1381

Kind regards
-Salam

Hi @Salam_Al-Khammasi,

I think this change should fix the error:

However, I’d also recommend turning off deprecation warnings (deprecation_warnings) and strict mode (strict) in config.inc.php, if they’re turned on.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thank you @asmecher, for prompt response and kind advice. The website back live with on errors
with best regards

1 Like