[OJS 2.4.8.5 to OJS 3.2.0-3]: warning and notice related to concatenateIntoAbout and concatenateIntoMasthead

[code: Installer Installer::concatenateIntoAbout]

Warning: Illegal string offset ‘en_US’ in /var/www/html/lib/pkp/classes/db/SettingsDAO.inc.php on line 35

Warning: Cannot use a scalar value as an array in /var/www/html/lib/pkp/classes/db/SettingsDAO.inc.php on line 35

Warning: Cannot use a scalar value as an array in /var/www/html/lib/pkp/classes/db/SettingsDAO.inc.php on line 35

Warning: Cannot use a scalar value as an array in /var/www/html/lib/pkp/classes/db/SettingsDAO.inc.php on line 35

Warning: Cannot use a scalar value as an array in /var/www/html/lib/pkp/classes/db/SettingsDAO.inc.php on line 35

[code: Installer Installer::concatenateIntoMasthead]

Warning: Illegal string offset ‘en_US’ in /var/www/html/lib/pkp/classes/db/SettingsDAO.inc.php on line 35

Notice: Undefined index: UK in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Notice: Undefined index: UK in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Notice: Undefined index: UK in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Notice: Undefined index: UK in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Notice: Undefined index: UK in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Warning: Cannot use a scalar value as an array in /var/www/html/lib/pkp/classes/db/SettingsDAO.inc.php on line 35

Notice: Undefined index: USA in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Notice: Undefined index: USA in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Notice: Undefined index: USA in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Notice: Undefined index: USA in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Notice: Undefined index: USA in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Notice: Undefined index: USA in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Notice: Undefined index: ED in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Notice: Undefined index: ED in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Warning: Cannot use a scalar value as an array in /var/www/html/lib/pkp/classes/db/SettingsDAO.inc.php on line 35

Warning: Cannot use a scalar value as an array in /var/www/html/lib/pkp/classes/db/SettingsDAO.inc.php on line 35

Notice: Undefined index: UK in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Notice: Undefined index: UK in /var/www/html/classes/install/Upgrade.inc.php on line 2289

Dear all,
I run upgrade script with success but during execution it returns to me some errors in the list above.
I have searched in all the forum for a solution or posts with same problems but I haven’t found anything.
Anyone with ideas?
Thank you very much
Regards
Antonio

Hi @Antonio_Fracasso,

I think you have some invalid data in your journal_settings table, specifically settings that have a mix of localized (language-specific) and non-localized content. Did you work with data in that table manually? What do you get for the following query?

SELECT DISTINCT a.setting_name FROM journal_settings a JOIN journal_settings b ON (a.setting_name = b.setting_name AND a.locale IS NULL and b.locale IS NOT NULL);

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi @asmecher,

I can work with database manually, and I can operate with data.

When I ran your query, I found 0 records, but if I change null value with empty string:

SELECT DISTINCT a.setting_name FROM journal_settings a JOIN journal_settings b ON (a.setting_name = b.setting_name AND a.locale = "" and b.locale <> "");

I find two records:
authorSelfArchivePolicy
metaCitations

Duplicated value for empty string?

UPGRADE
A query for “authorSelfArchivePolicy” reveal a group of records with no locale and two records for the same journal_id, one with locale en_US and the other with empty string.
A query for “metaCitations” reveal two kind of setting_type, bool and string for a group of 8 journal_id while other records have only one type of “metaCitations” setting_type, bool.

Thank you

Regards,
Antonio

Hi @Antonio_Fracasso,

Ah, that does help, thanks.

You can remove all entries from journal_settings with setting_name='metaCitations'.

As for authorSelfArchivePolicy, the locale field should always be set to a valid locale (e.g. en_US for U.S. English – see the list in registry/locales). I’d suggest correcting these in the database before running the upgrade script. Make sure to delete all .php files from cache/ after making changes like this in the database, to ensure that cached data isn’t interfering with the updated settings. (And please make sure you have a good backup before doing any of this!)

Regards,
Alec Smecher
Public Knowledge Project Team