OJS 3.3.0.3 Not Setting Locales Correctly

I have a new OJS installation of version 3.3.0.3. I get a blank section when I click on “journal” under settings. Masthead and Contact tabs are blank but Sections and Categories show their content.
image
The error I am seeing in the browser console is TypeError: e.availableLocales is null in the file build.js

Why is availableLocales coming up empty?

I have the setting locale = en_US in the config file and English is set as the primary locale in site settings image

The error log has the following lines repeated severally.
[Thu Feb 11 16:59:35.354615 2021] [php7:warn] [pid 16964:tid 1912] [client 127.0.0.1:54145] PHP Warning: array_merge(): Expected parameter 2 to be an array, null given in ...\\ojs\\lib\\pkp\\classes\\template\\PKPTemplateManager.inc.php on line 702 [Thu Feb 11 16:59:35.354615 2021] [php7:warn] [pid 16964:tid 1912] [client 127.0.0.1:54145] PHP Warning: array_unique() expects parameter 1 to be array, null given in ...\\ojs\\lib\\pkp\\classes\\template\\PKPTemplateManager.inc.php on line 707 [Thu Feb 11 16:59:35.354615 2021] [php7:warn] [pid 16964:tid 1912] [client 127.0.0.1:54145] PHP Warning: array_filter() expects parameter 1 to be array, null given in ...\\ojs\\lib\\pkp\\classes\\template\\PKPTemplateManager.inc.php on line 710 [Thu Feb 11 16:59:35.354615 2021] [php7:warn] [pid 16964:tid 1912] [client 127.0.0.1:54145] PHP Warning: array_values() expects parameter 1 to be array, null given in ...\\ojs\\lib\\pkp\\classes\\template\\PKPTemplateManager.inc.php on line 711 [Thu Feb 11 16:59:35.508305 2021] [php7:warn] [pid 16964:tid 1912] [client 127.0.0.1:54145] PHP Warning: Invalid argument supplied for foreach() in ...\\ojs\\lib\\pkp\\classes\\services\\PKPSchemaService.inc.php on line 573 [Thu Feb 11 16:59:35.508305 2021] [php7:warn] [pid 16964:tid 1912] [client 127.0.0.1:54145] PHP Warning: Invalid argument supplied for foreach() in ...\\ojs\\lib\\pkp\\classes\\services\\PKPSchemaService.inc.php on line 573 [Thu Feb 11 16:59:35.508305 2021] [php7:warn] [pid 16964:tid 1912] [client 127.0.0.1:54145] PHP Warning: Invalid argument supplied for foreach() in ...\\ojs\\lib\\pkp\\classes\\services\\PKPSchemaService.inc.php on line 573 [Thu Feb 11 16:59:35.508305 2021] [php7:warn] [pid 16964:tid 1912] [client 127.0.0.1:54145] PHP Warning: Invalid argument supplied for foreach() in ...\\ojs\\lib\\pkp\\classes\\services\\PKPSchemaService.inc.php on line 573
It is definite locales are not being set correctly.

NB: Opened an issue here [OJS] 3.3.0.3 TypeError: e.availableLocales is null · Issue #6749 · pkp/pkp-lib · GitHub

Can you ensure that browser’s cache is cleared after the upgrade? If it doesn’t help, also, I’d clean template and data cache (Administration → Administrative functions) just in case.

I tried clearing cache it didn’t help. But I did a local install and got access to log files. See update above

Yes, according to the error supportedFormLocales setting is missing from a journal_settings table for a journal where error occurs. To ensure, you can run a database query:

SELECT * FROM journal_settings WHERE setting_name = 'supportedFormLocales' AND journal_id = 1

Where the last number should be substituted by your journal’s id. It’s the case if it doesn’t return anything.

You can pick up the locale for forms in Website Setting -> Setup -> Languages.

I think it was solved as part of this issue: Upgrade to 3.3.0.2 fails when a journal has no supportedFormLocales · Issue #6710 · pkp/pkp-lib · GitHub
But for debugging purposes it would be helpful to know:

  • From which version you have updated
  • What supported form locales you had before (only primary or secondary too)
  • Did you receive any related notices/warnings during the upgrade
1 Like

The setting supportedFormLocales did not exist in the table journal_settings. I inserted it manually into the table together with the value ["en_US"] and the and the problem is now solved.

image

Most likely the upgrade process skipped to insert it somehow and I didn’t notice, though it showed “upgrade successful”. But the problem is now gone. Thank you for your help.

1 Like

He intentado modificar manualmente, me sale este error. Please help me.
Screenshot_1