Issue after 3.3 > 3.4 upgrade : some admin pages do not load

Some pages in the admin interface do not load, just spinning
I have been asked to manage a journal that was originnaly deployed on a shared hosting using softaculous, it was version 3.3.
I have moved it to a debian server with nginx and php8.3. Launched the upgrade without issues.

Steps I took leading up to the issue

  1. Go to ‘Backend > Administration > Site Management’
  2. Click on ‘Hosted Journals’
  3. I get a ‘Loading’ with spinning circle
  4. Same thing for ‘Backend > Administration > Site settings’

What application are you using?
OJS 3.4.0.7

Server Information

Setting Name Setting Value
OS platform Linux
PHP version 8.3.14
Apache version nginx/1.22.1
Database driver mysql
Database server version 10.11.6-MariaDB-0+deb12u1

Additional information

Web browser console output :

      * hosted journals :  
jquery.js?v=3.4.0.7:10109 
                
       GET https://domain.com/index.php/index/$$$call$$$/grid/admin/context/context-grid/fetch-grid?_=1733575034878 500 (Internal Server Error)
send @ jquery.js?v=3.4.0.7:10109
ajax @ jquery.js?v=3.4.0.7:9690
jQuery.<computed> @ jquery.js?v=3.4.0.7:9846
$.pkp.controllers.UrlInDivHandler.reload @ UrlInDivHandler.js?v=3.4.0.7:59
$.pkp.controllers.UrlInDivHandler @ UrlInDivHandler.js?v=3.4.0.7:31
$.pkp.classes.ObjectProxy.parent @ ObjectProxy.js?v=3.4.0.7:112
proxyConstructor @ Helper.js?v=3.4.0.7:283
$.pkp.classes.Helper.objectFactory @ Helper.js?v=3.4.0.7:209
(anonymous) @ jquery.pkp.js?v=3.4.0.7:37
each @ jquery.js?v=3.4.0.7:385
each @ jquery.js?v=3.4.0.7:207
$.fn.pkpHandler @ jquery.pkp.js?v=3.4.0.7:31
(anonymous) @ contexts:365
mightThrow @ jquery.js?v=3.4.0.7:3766
process @ jquery.js?v=3.4.0.7:3834
setTimeout
(anonymous) @ jquery.js?v=3.4.0.7:3872
fire @ jquery.js?v=3.4.0.7:3500
fireWith @ jquery.js?v=3.4.0.7:3630
fire @ jquery.js?v=3.4.0.7:3638
fire @ jquery.js?v=3.4.0.7:3500
fireWith @ jquery.js?v=3.4.0.7:3630
ready @ jquery.js?v=3.4.0.7:4110
completed @ jquery.js?v=3.4.0.7:4120
      * site settings :  
jquery.js?v=3.4.0.7:10109
                
       GET https://domain.com/index.php/index/$$$call$$$/grid/admin/languages/admin-language-grid/fetch-grid?_=1733575162082 500 (Internal Server Error)
send @ jquery.js?v=3.4.0.7:10109
ajax @ jquery.js?v=3.4.0.7:9690
jQuery.<computed> @ jquery.js?v=3.4.0.7:9846
$.pkp.controllers.UrlInDivHandler.reload @ UrlInDivHandler.js?v=3.4.0.7:59
$.pkp.controllers.UrlInDivHandler @ UrlInDivHandler.js?v=3.4.0.7:31
$.pkp.classes.ObjectProxy.parent @ ObjectProxy.js?v=3.4.0.7:112
proxyConstructor @ Helper.js?v=3.4.0.7:283
$.pkp.classes.Helper.objectFactory @ Helper.js?v=3.4.0.7:209
(anonymous) @ jquery.pkp.js?v=3.4.0.7:37
each @ jquery.js?v=3.4.0.7:385
each @ jquery.js?v=3.4.0.7:207
$.fn.pkpHandler @ jquery.pkp.js?v=3.4.0.7:31
(anonymous) @ settings:372
mightThrow @ jquery.js?v=3.4.0.7:3766
process @ jquery.js?v=3.4.0.7:3834
setTimeout
(anonymous) @ jquery.js?v=3.4.0.7:3872
fire @ jquery.js?v=3.4.0.7:3500
fireWith @ jquery.js?v=3.4.0.7:3630
fire @ jquery.js?v=3.4.0.7:3638
fire @ jquery.js?v=3.4.0.7:3500
fireWith @ jquery.js?v=3.4.0.7:3630
ready @ jquery.js?v=3.4.0.7:4110
completed @ jquery.js?v=3.4.0.7:4120
      * config.inc.php extract :  
;;;;;;;;;;;;;;;;;;;;;
; Database Settings ;
;;;;;;;;;;;;;;;;;;;;;

[database]

driver = mysqli
host = localhost
username = ***
password = ***
name = ***

; Set the non-standard port and/or socket, if used
; port = 3306
; unix_socket = /var/run/mysqld/mysqld.sock

; Database collation
; collation = utf8_general_ci

; Enable database debug output (very verbose!)
debug = Off




;;;;;;;;;;;;;;;;;;;;;;;;;
; Localization Settings ;
;;;;;;;;;;;;;;;;;;;;;;;;;

[i18n]

; Default locale
locale = fr_FR

; Database connection character set
connection_charset = utf8
      * phpmyadmin : journal_settings table :  

Thanks a lot for the help, and let me know if you need more details.

Hi @DeMiro5001,

Thanks for your post. The web browser console output is often helpful, but often even more helpful in identifying the problem is the output of your PHP error logs - are you able to provide that.

-Roger
PKP Team

1 Like

Here is the latest php log :

[06-Dec-2024 21:18:22] NOTICE: fpm is running, pid 786
[06-Dec-2024 21:18:22] NOTICE: ready to handle connections
[06-Dec-2024 21:18:22] NOTICE: systemd monitor interval set to 10000ms
[06-Dec-2024 21:20:09] WARNING: [pool lychee] server reached max_children setting (4), consider raising it
[07-Dec-2024 07:16:22] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[07-Dec-2024 07:36:01] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[07-Dec-2024 07:40:40] NOTICE: Terminating ...
[07-Dec-2024 07:40:40] NOTICE: exiting, bye-bye!
[07-Dec-2024 07:41:35] NOTICE: fpm is running, pid 790
[07-Dec-2024 07:41:35] NOTICE: ready to handle connections
[07-Dec-2024 07:41:35] NOTICE: systemd monitor interval set to 10000ms
[07-Dec-2024 07:42:10] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[07-Dec-2024 12:38:53] WARNING: [pool ojs] server reached max_children setting (4), consider raising it
[07-Dec-2024 13:32:05] WARNING: [pool ojs] server reached max_children setting (4), consider raising it
[07-Dec-2024 19:17:47] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 00:00:04] NOTICE: error log file re-opened
[08-Dec-2024 07:07:51] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 10:04:51] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 10:08:20] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 10:08:26] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 10:16:46] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 10:16:49] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 10:21:24] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 10:25:23] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 10:28:58] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 10:29:23] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 10:29:47] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 11:05:43] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
[08-Dec-2024 11:05:48] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful

But I found nginx logs more talkative :

2024/12/08 10:16:23 [error] 15212#15212: *14727 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function getDisplayName() on null in /var/www/ojs/lib/pkp/classes/i18n/Locale.php:279
Stack trace:
#0 [internal function]: PKP\i18n\Locale->PKP\i18n\{closure}()
#1 /var/www/ojs/lib/pkp/classes/i18n/Locale.php(279): array_map()
#2 /var/www/ojs/lib/pkp/classes/i18n/Locale.php(271): PKP\i18n\Locale->getSupportedLocales()
#3 /var/www/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): PKP\i18n\Locale->getSupportedFormLocales()
#4 /var/www/ojs/lib/pkp/classes/controllers/grid/GridCellProvider.php(68): Illuminate\Support\Facades\Facade::__callStatic()
#5 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1262): PKP\controllers\grid\GridCellProvider->render()
#6 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1163): PKP\controllers\grid\GridHandler->_renderCellInternally()
#7 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1138): PKP\controllers\grid\GridHandler->ren" while reading response header from upstream, client: 197.2.87.25, server: domain.com, request: "GET /index.php/index/$$$call$$$/grid/admin/context/context-grid/fetch-grid?_=1733652982259 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.3-fpm-ojs.sock:", host: "domain.com", referrer: "https://domain.com/index.php/index/admin/contexts"
2024/12/08 10:21:03 [error] 15212#15212: *14816 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function getDisplayName() on null in /var/www/ojs/lib/pkp/classes/i18n/Locale.php:279
Stack trace:
#0 [internal function]: PKP\i18n\Locale->PKP\i18n\{closure}()
#1 /var/www/ojs/lib/pkp/classes/i18n/Locale.php(279): array_map()
#2 /var/www/ojs/lib/pkp/classes/i18n/Locale.php(271): PKP\i18n\Locale->getSupportedLocales()
#3 /var/www/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): PKP\i18n\Locale->getSupportedFormLocales()
#4 /var/www/ojs/lib/pkp/classes/controllers/grid/GridCellProvider.php(68): Illuminate\Support\Facades\Facade::__callStatic()
#5 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1262): PKP\controllers\grid\GridCellProvider->render()
#6 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1163): PKP\controllers\grid\GridHandler->_renderCellInternally()
#7 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1138): PKP\controllers\grid\GridHandler->ren" while reading response header from upstream, client: 197.2.87.25, server: domain.com, request: "GET /index.php/index/$$$call$$$/grid/admin/context/context-grid/fetch-grid?_=1733653261980 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.3-fpm-ojs.sock:", host: "domain.com", referrer: "https://domain.com/index.php/index/admin/contexts"
2024/12/08 10:21:17 [error] 15212#15212: *14816 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function getDisplayName() on null in /var/www/ojs/lib/pkp/classes/i18n/Locale.php:279
Stack trace:
#0 [internal function]: PKP\i18n\Locale->PKP\i18n\{closure}()
#1 /var/www/ojs/lib/pkp/classes/i18n/Locale.php(279): array_map()
#2 /var/www/ojs/lib/pkp/classes/i18n/Locale.php(271): PKP\i18n\Locale->getSupportedLocales()
#3 /var/www/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): PKP\i18n\Locale->getSupportedFormLocales()
#4 /var/www/ojs/lib/pkp/classes/controllers/grid/GridCellProvider.php(68): Illuminate\Support\Facades\Facade::__callStatic()
#5 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1262): PKP\controllers\grid\GridCellProvider->render()
#6 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1163): PKP\controllers\grid\GridHandler->_renderCellInternally()
#7 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1138): PKP\controllers\grid\GridHandler->ren" while reading response header from upstream, client: 197.2.87.25, server: domain.com, request: "GET /index.php/index/$$$call$$$/grid/admin/languages/admin-language-grid/fetch-grid?_=1733653276554 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.3-fpm-ojs.sock:", host: "domain.com", referrer: "https://domain.com/index.php/index/admin/settings"
2024/12/08 10:28:16 [error] 15212#15212: *14888 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function getDisplayName() on null in /var/www/ojs/lib/pkp/classes/i18n/Locale.php:279
Stack trace:
#0 [internal function]: PKP\i18n\Locale->PKP\i18n\{closure}()
#1 /var/www/ojs/lib/pkp/classes/i18n/Locale.php(279): array_map()
#2 /var/www/ojs/lib/pkp/classes/i18n/Locale.php(271): PKP\i18n\Locale->getSupportedLocales()
#3 /var/www/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): PKP\i18n\Locale->getSupportedFormLocales()
#4 /var/www/ojs/lib/pkp/classes/controllers/grid/GridCellProvider.php(68): Illuminate\Support\Facades\Facade::__callStatic()
#5 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1262): PKP\controllers\grid\GridCellProvider->render()
#6 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1163): PKP\controllers\grid\GridHandler->_renderCellInternally()
#7 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1138): PKP\controllers\grid\GridHandler->ren" while reading response header from upstream, client: 197.2.87.25, server: domain.com, request: "GET /index.php/index/$$$call$$$/grid/admin/languages/admin-language-grid/fetch-grid?_=1733653694143 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.3-fpm-ojs.sock:", host: "domain.com", referrer: "https://domain.com/index.php/index/admin/settings"
2024/12/08 10:28:50 [error] 15212#15212: *14888 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function getDisplayName() on null in /var/www/ojs/lib/pkp/classes/i18n/Locale.php:279
Stack trace:
#0 [internal function]: PKP\i18n\Locale->PKP\i18n\{closure}()
#1 /var/www/ojs/lib/pkp/classes/i18n/Locale.php(279): array_map()
#2 /var/www/ojs/lib/pkp/classes/i18n/Locale.php(271): PKP\i18n\Locale->getSupportedLocales()
#3 /var/www/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): PKP\i18n\Locale->getSupportedFormLocales()
#4 /var/www/ojs/lib/pkp/classes/controllers/grid/GridCellProvider.php(68): Illuminate\Support\Facades\Facade::__callStatic()
#5 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1262): PKP\controllers\grid\GridCellProvider->render()
#6 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1163): PKP\controllers\grid\GridHandler->_renderCellInternally()
#7 /var/www/ojs/lib/pkp/classes/controllers/grid/GridHandler.php(1138): PKP\controllers\grid\GridHandler->ren" while reading response header from upstream, client: 197.2.87.25, server: domain.com, request: "GET /index.php/index/$$$call$$$/grid/admin/context/context-grid/fetch-grid?_=1733653729462 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.3-fpm-ojs.sock:", host: "domain.com", referrer: "https://domain.com/index.php/index/admin/contexts"

HI @DeMiro5001,

Thanks for this. I’ll see if one of our team members can have a look at this when they are available.

-Roger
PKP Team

1 Like

Hi @DeMiro5001,

Did you update the locale setting in the [i18n] section of config.inc.php? See:

Regards,
Alec Smecher
Public Knowledge Project Team

I checked the backup from the shared hosting, here is the locale section on config.inc.php :

;;;;;;;;;;;;;;;;;;;;;;;;;
; Localization Settings ;
;;;;;;;;;;;;;;;;;;;;;;;;;

[i18n]

; Default locale
locale = fr_FR

; Client output/input character set
client_charset = utf-8

; Database connection character set
connection_charset = utf8

And here is the content of the locale folder of the updated ojs :

ls locale
ar           eo     hu  mr     sq
az           es     hy  ms     sr@cyrillic
be@cyrillic  es_MX  id  nb     sr@latin
bg           eu     is  nl     sv
bs           fa     it  pl     th
ca           fi     ja  pt_BR  tr
ckb          fr_CA  ka  pt_PT  uk
cnr          fr_FR  kk  ro     ur
cs           gd     ko  ru     uz@cyrillic
da           gl     ky  se     uz@latin
de           he     lt  si     vi
dsb          hi     lv  sid    zh_CN
el           hr     mk  sk     zh_Hant
en           hsb    mn  sl

I may have changed the language of the admin interface to English then reverted to French.

I have installed a local copy of ojs and compared the journal_settings table with the one of the production ojs.
In the production ojs, the locale column is empty.

Hi @DeMiro5001,

Beware of reading too much into the locale column of journal_settings in general – some settings will have a value there, and others will have it empty, depending on what the setting_name is. And be careful not to set a value for locale en masse.

Can you check what the result is for the following query?

select * from journal_settings where setting_name='supportedFormLocales';

Regards,
Alec Smecher
Public Knowledge Project Team

journal_setting_id journal_id locale setting_name setting_value
35 1 supportedFormLocales [“en”,“fr_FR”]

Hi @DeMiro5001,

It looks like your system isn’t able to provide the display name for the French locale; I’m not 100% sure where the failure is happening but it could be PHP, the PHP intl extension, or your system’s underlying locale information.

In any case, you can try working around it with this change:

diff --git a/classes/i18n/Locale.php b/classes/i18n/Locale.php
index 659aac29b4..37c10b525b 100644
--- a/classes/i18n/Locale.php
+++ b/classes/i18n/Locale.php
@@ -276,7 +276,7 @@ class Locale implements LocaleInterface
      */
     public function getSupportedLocales(): array
     {
-        return $this->supportedLocaleNames ??= array_map(fn (string $locale) => $this->getMetadata($locale)->getDisplayName(), $this->_getSupportedLocales());
+        return $this->supportedLocaleNames ??= array_map(fn (string $locale) => $this->getMetadata($locale)?->getDisplayName() ?? $locale, $this->_getSupportedLocales());
     }
 
     /**

I’m hesitant to commit this to OJS until I know more about what’s happening and why, but if it’s able to clear up the issue you’re encountering, that’ll be a useful data point.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

I tried this manually and it worked.
But I got in hosted journals > “my journal” > users :

##default.groups.name.manager##, ##default.groups.name.editor##, ##default.groups.name.productionEditor##, ##default.groups.name.sectionEditor##, ##default.groups.name.guestEditor##, ##default.groups.name.copyeditor##, ##default.groups.name.designer##, ##default.groups.name.funding##, ##default.groups.name.indexer##, ##default.groups.name.layoutEditor##, ##default.groups.name.marketing##, ##default.groups.name.proofreader##, ##default.groups.name.author##, ##default.groups.name.translator##, 

This is when the journal language was set on French but when switching to English, the placeholders are replaced with the correct values. I think I saw some threads talking about it. I will search and report back.

Thanks a lot for your help

Hi @DeMiro5001,

Thanks for confirming – I’ve added this to the code for future 3.4.0-x and 3.5.0-x releases.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

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