Describe the issue or problem
The following error occurs when an article is viewed in :
Fatal error : Uncaught Error: Call to a member function getDisplayName() on null in /var/www/ojs3/lib/pkp/classes/i18n/Locale.php:279 Stack trace: #0 [internal function]: PKP\i18n\Locale->PKP\i18n{closure}() #1 /var/www/ojs3/lib/pkp/classes/i18n/Locale.php(279): array_map() #2 /var/www/ojs3/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): PKP\i18n\Locale->getSupportedLocales() #3 /var/www/ojs3/plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.php(421): Illuminate\Support\Facades\Facade::__callStatic() #4
/var/www/ojs3/plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.php(332): APP\plugins\generic\citationStyleLanguage\CitationStyleLanguagePlugin->getCitation() #5 [internal function]: APP\plugins\generic\citationStyleLanguage\CitationStyleLanguagePlugin->getTemplateData() #6 /var/www/ojs3/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array() #7 /var/www/ojs3/lib/pkp/classes/plugins/Hook.php(113): PKP\plugins\Hook::run() #8 /var/www/ojs3/pages/article/ArticleHandler.php(354): PKP\plugins\Hook::call() #9 [internal function]: APP\pages\article\ArticleHandler->view() #10 /var/www/ojs3/lib/pkp/classes/core/PKPRouter.php(334): call_user_func() #11 /var/www/ojs3/lib/pkp/classes/core/PKPPageRouter.php(277): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest() #12 /var/www/ojs3/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route() #13 /var/www/ojs3/lib/pkp/classes/core/PKPApplication.php(388): PKP\core\Dispatcher->dispatch() #14 /var/www/ojs3/index.php(20): PKP\core\PKPApplication->execute() #15 {main} thrown in /var/www/ojs3/lib/pkp/classes/i18n/Locale.php on line 279
When i try to access the plugin tab and other forms the spin keep loading forever. The error is below:
Fatal error : Uncaught Error: Call to a member function getDisplayName() on null in /var/www/ojs3/lib/pkp/classes/i18n/Locale.php:279 Stack trace: #0 [internal function]: PKP\i18n\Locale->PKP\i18n{closure}() #1 /var/www/ojs3/lib/pkp/classes/i18n/Locale.php(279): array_map() #2 /var/www/ojs3/lib/pkp/classes/i18n/Locale.php(271): PKP\i18n\Locale->getSupportedLocales() #3 /var/www/ojs3/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): PKP\i18n\Locale->getSupportedFormLocales() #4
/var/www/ojs3/lib/pkp/classes/controllers/grid/GridCellProvider.php(68): Illuminate\Support\Facades\Facade::__callStatic() #5 /var/www/ojs3/lib/pkp/classes/controllers/grid/GridHandler.php(1262): PKP\controllers\grid\GridCellProvider->render() #6 /var/www/ojs3/lib/pkp/classes/controllers/grid/GridHandler.php(1163): PKP\controllers\grid\GridHandler->_renderCellInternally() #7 /var/www/ojs3/lib/pkp/classes/controllers/grid/GridHandler.php(1138): PKP\controllers\grid\GridHandler->renderRowInternally() #8 /var/www/ojs3/lib/pkp/classes/controllers/grid/GridHandler.php(1188): PKP\controllers\grid\GridHandler->renderRowsInternally() #9 /var/www/ojs3/lib/pkp/classes/controllers/grid/GridHandler.php(1063): PKP\controllers\grid\GridHandler->renderGridBodyPartsInternally() #10 /var/www/ojs3/lib/pkp/classes/controllers/grid/GridHandler.php(735): PKP\controllers\grid\GridHandler->doSpecificFetchGridActions() #11 [internal function]: PKP\controllers\grid\GridHandler->fetchGrid() #12 /var/www/ojs3/lib/pkp/classes/core/PKPRouter.php(334): call_user_func() #13 /var/www/ojs3/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest() #14 /var/www/ojs3/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPComponentRouter->route() #15 /var/www/ojs3/lib/pkp/classes/core/PKPApplication.php(388): PKP\core\Dispatcher->dispatch() #16 /var/www/ojs3/index.php(20): PKP\core\PKPApplication->execute() #17 {main} thrown in /var/www/ojs3/lib/pkp/classes/i18n/Locale.php on line 279
The error is the same but from different origins.
In an article page the error came from the CitationStyleLanguagePlugin.
The error from plugins tab came from getSupportedFormLocales().
Both of them uses the PKP\i18n\Locale->getSupportedLocales().
Steps I took leading up to the issue
- Go to an journal and view an article or go to plugin tabs or other forms of site administration page
- See error
What application are you using?
OJS 3.4.0-5
Additional information
We have journals that this error occurs and other not. All journal pages can be viewed. But, in a journal, or all the articles render or none of them render. Example: An journal J1 have X articles and all of X articles render normally but another journal J2 have Y articles however none of Y articles render with this error.
The error on plugins tab and other forms always occurs.
Thank you in advance for the attention and patience.