I had a very similar problem recently with one of my journals, getting error:
PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in …/lib/pkp/controllers/grid/admin/context/ContextGridHandler.inc.php:218
and discovered (by following the advice above), that while the “site” table was correct, the “journal_settings” table was not. Running the following query:
select * from journal_settings where setting_name like “%locale%”;
I had the following results:
±-----------±-------±---------------------------±--------------±-------------+
| journal_id | locale | setting_name | setting_value | setting_type |
±-----------±-------±---------------------------±--------------±-------------+
| 3 | | supportedFormLocales | [“en_US”] | object |
| 3 | | supportedLocales | [“en_US”] | object |
| 3 | | supportedSubmissionLocales | [“en_US”] | object |
| 4 | | supportedFormLocales | [“en_US”] | object |
| 4 | | supportedLocales | [“en_US”] | object |
| 4 | | supportedSubmissionLocales | [“en_US”] | object |
| 9 | | supportedLocales | [“en_US”] | object |
| 10 | | supportedFormLocales | [“en_US”] | NULL |
| 10 | | supportedLocales | [“en_US”] | object |
| 10 | | supportedSubmissionLocales | [“en_US”] | NULL |
| 12 | | supportedFormLocales | [“en_US”] | object |
| 12 | | supportedLocales | [“en_US”] | object |
| 12 | | supportedSubmissionLocales | [“en_US”] | object |
| 13 | | supportedFormLocales | [“en_US”] | object |
| 13 | | supportedLocales | [“en_US”] | object |
| 13 | | supportedSubmissionLocales | [“en_US”] | object |
| 15 | | supportedFormLocales | [“en_US”] | object |
| 15 | | supportedLocales | [“en_US”] | object |
| 15 | | supportedSubmissionLocales | [“en_US”] | object |
| 16 | | supportedFormLocales | [“en_US”] | object |
| 16 | | supportedLocales | [“en_US”] | object |
| 16 | | supportedSubmissionLocales | [“en_US”] | object |
| 17 | | supportedFormLocales | [“en_US”] | object |
| 17 | | supportedLocales | [“en_US”] | object |
| 17 | | supportedSubmissionLocales | [“en_US”] | object |
| 18 | | supportedFormLocales | [“en_US”] | NULL |
| 18 | | supportedLocales | [“en_US”] | NULL |
| 18 | | supportedSubmissionLocales | [“en_US”] | NULL |
| 19 | | supportedFormLocales | [“en_US”] | NULL |
| 19 | | supportedLocales | [“en_US”] | NULL |
| 19 | | supportedSubmissionLocales | [“en_US”] | NULL |
±-----------±-------±---------------------------±--------------±-------------+
Any guesses as to which journal was broken? (Hint, it was #9). It was because of the two missing two rows of data. Therein, I simply ran:
insert into journal_settings (journal_id, locale, setting_name, setting_value, setting_type) values (9, ‘’, ‘supportedSubmissionLocales’, ‘[“en_U
S”]’, ‘object’);
insert into journal_settings (journal_id, locale, setting_name, setting_value, setting_type) values (9, ‘’, ‘supportedFormLocales’, ‘[“en_US”]’,
‘object’);
and problem solved.