Users's page not loading - Call to a member function null and Illegal string offset

Hi everyone.
I recently changed my ojs installation to another server and upgraded it from 2.4 to 3.2.
I’m having a problem with missing data after I had the great idea of deleting some users from de database. Now, I cannot load the users page from a specific journal.

The error log shows a lot of “Illegal string offset” to pt_BR, en_US and en_ES. And the fatal error is:
Uncaught Error: Call to a member function getLocalizedAcronym() on null in /var/www/html/cache/t_compile/0a2fd5de575587bfde917e697de9c2aa5619a9d2^\nStack trace:\n#0 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_62b213ea8b8e10_51648214(Object(Smarty_Internal_Template))\n#1 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))\n#2 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))\n#3 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 0)\n#4 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Sm in /var/www/html/cache/t_compile/0a2fd5de575587bfde917e697de9c2aa5619a9d2^ on line 32, referer:

So, I believe that locale is missing somewhere. But how can I find where is the missing data?
Appreciate any help.

Hi @melise

Have you checked journal_settings table of your OJS installation and searched for any NULL value in the locale column ?


Hi @israel.cefrin! No NULL value in the locale column. But I find some NULL values in the setting_type column… those are contactAffiliation, licenseTerms and sidebar in the setting_name column. Should I set a setting_type?

Hi @melise

This message error:
Call to a member function getLocalizedAcronym() on null

Relates to a missing locale value rather than other settings. Given the error mentions controllersgridtaskstaskcould you please check the task table as well?


Hi! no null values the table scheduled_task. I find out that the users’s page not loading was something else. But, today I tryed to import a xml file using native import/export plugin and got this error, very similar to the first one:

PHP Fatal error:  Uncaught Error: Call to a member function getLocalizedAcronym() on null in /var/www/html/cache/t_compile/0a2fd5de575587bfde917e697de9c2aa5619a9d2^\nStack trace:\
n#0 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_62da96b3367586_27955459(Object(Smarty_Internal_Template))\
n#1 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))\
n#2 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))\
n#3 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 0)\
n#4 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Sm in /var/www/html/cache/t_compile/0a2fd5de575587bfde917e697de9c2aa5619a9d2^ on line 32, 

the line 32 in controllersgridtaskstask.php looks like this:
<?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'escape' ][ 0 ], array( $_smarty_tpl->tpl_vars['context']->value->getLocalizedAcronym() ));?>

Is it possible that it may be something related to plugins? :thinking:

Hi Melise,

It seems the error is triggered when $_smarty_tpl->tpl_vars['context']->value->getLocalizedAcronym() is called. Could you please review your journals and journals_settings for locales with Null values or missing ?


@israel.cefrin nothing null in the locale column, but I find some null values in the setting_type column. I also find a value “0” in the locale… here’s a print:

Hi @melise

A similar error has been reported (with a solution) on this thread:

Could you please review and check whether it would fix or help you to troubleshoot your issue?