OJS 3.2.0-3 OJS 3.2.1-1: Website Settings empty in Backend

I have recently updated another older Journal hosted by our University to a new Version.
Previous Version was 2.4.x.x.
As I have encountered difficulties in the Database upgrade before, I usually update in more than one step, so I installed OJS beforehand.

The Installation works fine to my knowledge.

When I upgrade to 3.2.1-1 or 3.2.0-3 The “Website Settings” Tab in the backend stays blank, as well as the Journal Masthead and some other pages. This of course renders the website as a whole unusable.



The error log shows the following messages:

PHP Warning: Invalid argument supplied for foreach() in /var/www/ojs/lib/pkp/classes/components/forms/FormComponent.inc.php on line 326, referer: https://www.journalname.org/index.php/vn/admin/index
PHP Warning: array_values() expects parameter 1 to be array, null given in /var/www/ojs/lib/pkp/classes/components/forms/FormComponent.inc.php on line 296, referer: https://www.journalname.org/index.php/vn/admin/index
PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/ojs/lib/pkp/controllers/grid/languages/LanguageGridHandler.inc.php on line 260, referer: https://www.journalname.org/index.php/vn/management/settings/website

I have tried this with and without .htaccess settings.

Any Ideas what may cause this?


Hi @KBodarwe,

Those log entries aren’t relevant to the problem you’re having; I’d recommend looking for something mentioning a Fatal Error. Also check your browser’s error console to see if there is something relevant there.

Alec Smecher
Public Knowledge Project Team

Hello @asmecher,
thanks. I thought they were relevant because I figured the elements on the page would be given to the form as an array, as mentioned in the error.

There are no fatal Errors in the error.log.
The Browser Log shows the following Error:

TypeError: e.availableLocales is null

I checked the FormComponent.inc.php mentioned above. Line 326 reads:

  	foreach ($this->locales as $locale) {

Line 296:

  	'supportedFormLocales' => array_values($this->locales), // See #5690

So I’m getting the feeling this might have something to do with incorrectly installed locales?

Aaaand I’ve found and fixed the Error.

My Languages Settings looked like this:

The unchecked boxes meant that no Language was selected for Forms and Submissions, hence the error. Why these were unchecked by default I don’t know. Why these can be unchecked, so no language is selected I don’t know either.

But whoever has the same error - here’s your solution.

1 Like

Hi @KBodarwe,

Glad to hear you tracked it down, and thanks for documenting; you’re right, it would be sensible to add a check to make sure at least one language stays available. I’ve filed it here: Ensure that langugae settings cannot be broken by disabling forms/submissions for all languages · Issue #6282 · pkp/pkp-lib · GitHub

Alec Smecher
Public Knowledge Project Team

This was the solution which worked for me
In config.inc.php
connection_charset = utf8 and not utf-8