[OJS 3.4.0.3] - Fatal error: Uncaught Error: Undefined constant "ROLE_ID_MANAGER"

Hello all,

when an user, that is not logged in, surfs on a page that is supposed to be publically visible, browser returns a 500 error. I enabled for sake of debugging the “display_errors = On” option
and the complete error output is as follows:

**Fatal error** : Uncaught Error: Undefined constant "ROLE_ID_MANAGER" in /home/account_name/public_html/cache/t_compile/77eab0d48ae26995d2b27ea041d87d954e8d7b1c^e3c52a8a644dae8ad3689fcdc7091f2c0eae2ce2_0.app.frontendcomponentseditLink.tpl.php:24 Stack trace: #0 /home/account_name/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_66508d9f54e268_74802896(Object(Smarty_Internal_Template)) 
#1 /home/account_name/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template)) 
#2 /home/account_name/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template)) 
#3 /home/account_name/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(386): Smarty_Internal_Template->render() 
#4 /home/account_name/public_html/cache/t_compile/77eab0d48ae26995d2b27ea041d87d954e8d7b1c^63c3703926f6cd217d548df875d7e1620d1ef19f_0.app.frontendpageseditorialTeam.tpl.php(38): Smarty_Internal_Template->_subTemplateRender('app:frontend/co...', NULL, '77eab0d48ae2699...', 0, 3600, Array, 0, false) 
#5 /home/account_name/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_66508d9f4a1af0_12083082(Object(Smarty_Internal_Template)) 
#6 /home/account_name/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template)) 
#7 /home/account_name/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template)) 
#8 /home/account_name/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render(false, 1) 
#9 /home/account_name/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, '77eab0d48ae2699...', NULL, 1) 
#10 /home/account_name/public_html/lib/pkp/classes/template/PKPTemplateManager.php(1325): Smarty_Internal_TemplateBase->display('frontend/pages/...', NULL, '77eab0d48ae2699...', NULL) 
#11 /home/account_name/public_html/lib/pkp/pages/about/AboutContextHandler.php(66): PKP\template\PKPTemplateManager->display('frontend/pages/...') 
#12 [internal function]: PKP\pages\about\AboutContextHandler->editorialTeam(Array, Object(APP\core\Request)) 
#13 /home/account_name/public_html/lib/pkp/classes/core/PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request)) 
#14 /home/account_name/public_html/lib/pkp/classes/core/PKPPageRouter.php(277): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array, false) 
#15 /home/account_name/public_html/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route(Object(APP\core\Request)) 
#16 /home/account_name/public_html/lib/pkp/classes/core/PKPApplication.php(387): PKP\core\Dispatcher->dispatch(Object(APP\core\Request)) 
#17 /home/account_name/public_html/index.php(21): PKP\core\PKPApplication->execute() 
#18 {main} thrown in **/home/account_name/public_html/cache/t_compile/77eab0d48ae26995d2b27ea041d87d954e8d7b1c^e3c52a8a644dae8ad3689fcdc7091f2c0eae2ce2_0.app.frontendcomponentseditLink.tpl.php** on line **24**

Any clue on how to deal with this problem?

Thanks.

Hi @murso,

What theme are you using?

Have you turned on strict mode in config.inc.php? (If so, turn it Off.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hello,

Have the same problem.
3.4.0.5
tried to turn strict off, doesn’t help
Theme: Health care
This applies to pages: about, submissions, editorialTeam, contact
When logged in - OK, when not logged in - blank page, 500 in apache logs and below full text in browser.

Full error:
Fatal error: Uncaught Error: Undefined constant “ROLE_ID_MANAGER” in /var/www/html/ojs/cache/t_compile/6dfbb34d1e5cf7bcbb7ce0a06e02d7d8ba677f06^e3c52a8a644dae8ad3689fcdc7091f2c0eae2ce2_0.app.frontendcomponentseditLink.tpl.php:24 Stack trace: #0 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_6690eb7bd66219_84474776() #1 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode() #2 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render() #3 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(386): Smarty_Internal_Template->render() #4 /var/www/html/ojs/cache/t_compile/6dfbb34d1e5cf7bcbb7ce0a06e02d7d8ba677f06^cb59ba72e0e986feec9a52ef595eb9a41c15df09_0.app.frontendpagesabout.tpl.php(42): Smarty_Internal_Template->_subTemplateRender() #5 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_6690eb7bd15926_26440461() #6 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode() #7 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render() #8 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render() #9 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_execute() #10 /var/www/html/ojs/lib/pkp/classes/template/PKPTemplateManager.php(1368): Smarty_Internal_TemplateBase->display() #11 /var/www/html/ojs/lib/pkp/pages/about/AboutContextHandler.php(53): PKP\template\PKPTemplateManager->display() #12 [internal function]: PKP\pages\about\AboutContextHandler->index() #13 /var/www/html/ojs/lib/pkp/classes/core/PKPRouter.php(334): call_user_func() #14 /var/www/html/ojs/lib/pkp/classes/core/PKPPageRouter.php(277): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest() #15 /var/www/html/ojs/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route() #16 /var/www/html/ojs/lib/pkp/classes/core/PKPApplication.php(388): PKP\core\Dispatcher->dispatch() #17 /var/www/html/ojs/index.php(21): PKP\core\PKPApplication->execute() #18 {main} thrown in /var/www/html/ojs/cache/t_compile/6dfbb34d1e5cf7bcbb7ce0a06e02d7d8ba677f06^e3c52a8a644dae8ad3689fcdc7091f2c0eae2ce2_0.app.frontendcomponentseditLink.tpl.php on line 24

Hi all,

I’ve tracked this down to a problem in the healthSciences theme with OJS 3.4.0. It’s filed here:

You can fix the issue by applying this change in plugins/themes/healthSciences/templates/frontend/components/editLink.tpl.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thanks, it works now :slight_smile:

1 Like

This topic was automatically closed after 11 days. New replies are no longer allowed.