Describe the issue or problem
— If you see missing text in my post that is data sanitization. —
I am running upgrade from ojs-3.3.0-20 to ojs-3.4.0-9, After running upgrade command “php tools/upgrade.php upgrade” I got the following errors:
Example of error:
A row with “author_id”=“111111” and “setting_name”=“biography” found in table “author_settings” which will conflict with other rows specific to the locale key “en” after the migration. Please review this row before upgrading.
[root@machine ojs]# php tools/upgrade.php upgrade
2025-06-26 15:11:06 [pre-install]
2025-06-26 15:11:06 [load: upgrade.xml]
2025-06-26 15:11:06 [version: 3.4.0.9]
2025-06-26 15:11:06 [code: Installer Installer::checkPhpVersion]
2025-06-26 15:11:06 [code: Installer Installer::installDefaultNavigationMenus]
2025-06-26 15:11:06 [code: Installer Installer::migrateStaticPagesToNavigationMenuItems]
2025-06-26 15:11:06 [migration: PKP\migration\upgrade\v3_4_0\I10249_FixProfileImageDataLoss]
2025-06-26 15:11:06 [migration: APP\migration\upgrade\v3_4_0\PreflightCheckMigration]
2025-06-26 15:11:56 [A pre-flight check failed. The software was successfully upgraded to 3.3.9.9 but could not be upgraded further (to 3.4.0.9). Check and correct the error, then try again .]
2025-06-26 15:11:56 [revert migration: PKP\migration\upgrade\v3_4_0\I10249_FixProfileImageDataLoss]
2025-06-26 15:11:56 [downgrade for "PKP\migration\upgrade\v3_4_0\I10249_FixProfileImageDataLoss" unsupported: Downgrade not supported]
ERROR: Upgrade failed: DB: A row with "author_id"="90114" and "setting_name"="biography" found in table "author_settings" which will conflict with other rows specific to the locale key "en" after the migration. Please review this row before upgrading.
A row with "author_id"="95" and "setting_name"="biography" found in table "author_settings" which will conflict with other rows specific to the locale key "en" after the migration. Pleas e review this row before upgrading.
A row with "author_id"="116" and "setting_name"="biography" found in table "author_settings" which will conflict with other rows specific to the locale key "en" after the migration. Pleas e review this row before upgrading.
A row with "author_id"="951" and "setting_name"="biography" found in table "author_settings" which will conflict with other rows specific to the locale key "en" after the migration. Pleas e review this row before upgrading.
A row with "author_id"="983" and "setting_name"="biography" found in table "author_settings" which will conflict with other rows specific to the locale key "en" after the migration. Pleas e review this row before upgrading.
A row with "author_id"="959" and "setting_name"="biography" found in table "author_settings" which will conflict with other rows specific to the locale key "en" after the migration. Pleas e review this row before upgrading.
...
...
...
A row with "author_id"="928" and "setting_name"="biography" found in table "author_settings" which will conflict with other rows specific to the locale key "en" after the migration. Pleas e review this row before upgrading.
A row with "author_id"="29" and "setting_name"="biography" found in table "author_settings" which will conflict with other rows specific to the locale key "en" after the migration. Pleas e review this row before upgrading.
A row with "author_id"="4" and "setting_name"="biography" found in table "author_settings" which will conflict with other rows specific to the locale key "en" after the migration. Pleas e review this row before upgrading.
A row with "author_id"="95" and "setting_name"="biography" found in table "author_settings" which will conflict with other rows specific to the locale key "en" after the migration. Pleas e review this row before upgrading.
[root@machine ojs]#
Steps I took leading up to the issue
- Downloaded version https://pkp.sfu.ca/ojs/download/ojs-3.4.0-9.tar.gz
- Replaced current version ojs-3.3.0-20 with ojs-3.4.0-9, replaced and update new config.inc.php with current config.inc.php, replace and update new public dir with current public dir
- ran upgrade command and found errors as above
- Note: I had other errors but I was able to resolve myself such as below. I resolve by moving usageEventLogs/*.log to a temp directory like empty out usageEventLogs to overcome the issue and I will try to resolve of these log files after upgrade - not sure how I will reprocess them any suggestion is appreciated:
ERROR: Upgrade failed: DB: There are one or more log files that were unable to finish processing. This happens when the scheduled task to process usage stats logs encounters a failure of some kind. These logs must be repaired and reprocessed or removed before the upgrade can continue. The logs can be found in the folders reject, processing and stage in /data/production/usageStats.
What application are you using?
It is: OJS 3.3.0-20
What have I tried:
I tried to resolve this “ERROR: Upgrade failed: DB …” by querying FROM table author_settings, WHERE field setting_name = ‘biography’ all the author_id in question taken from the error log above where (locale IS NULL OR locale = ‘’) but no result return, so I think my table and field and data in question are good. I please ask for your help of what have I missed. Here are my example queries:
SELECT author_id, setting_name, locale, setting_value
FROM author_settings
WHERE setting_name = 'biography'
AND (locale IS NULL OR locale = '')
AND author_id IN (
914, 905, 906, 951, 983, 909 , 959, 296, 918, 926, 927,
961, 962,
);
Screenshot for above query 1:
So I ran other sql query to find duplicates with ‘en’ locale, but no duplicated found so again I think my database is perfect. Please tell me what is it still an issue that I do not see, is it field name or literal string value convention:
SELECT author_id, COUNT(*) FROM author_settings
WHERE setting_name = 'biography'
AND locale = 'en'
GROUP BY author_id
HAVING COUNT(*) > 1;
Screenshot for above query 2:
Additional information
So I examined one record for example this is what I see, the literal string ‘en’ and ‘biography’ are there, what do you think:
Lastly when I look at the entire table, this is what I see:
Kindly thank you for any help.
Dung.