Article’s activity log doesn’t load on all submissions

Describe the issue or problem
On all submissions clicking on the activity log button infinitly shows the loading wheel.

Steps I took leading up to the issue
Upgrade from OJS 3.2.1 to OJS 3.3.0-13 and switching from PHP 7.4 to 8.0.
Before the upgrade of both everything worked fine.

What application are you using?
OJS 3.3.0-13

Additional information
The upgrade process worked fine with this feedback to php tools/upgrade.php upgrade:

2022-11-22 11:21:41 [pre-install]
2022-11-22 11:21:41 [load: upgrade.xml]
2022-11-22 11:21:41 [version: 3.3.0.13]
2022-11-22 11:21:41 [code: Installer Installer::checkPhpVersion]
2022-11-22 11:21:41 [code: Installer Installer::installDefaultNavigationMenus]
WARNING: The NavigationMenu (ContextId: 1, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 1, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 0, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
2022-11-22 11:21:41 [code: Installer Installer::migrateStaticPagesToNavigationMenuItems]
2022-11-22 11:21:41 [migration: PKPv3_3_0UpgradeMigration]
Removing orphaned submission_files entry ID 2614 with submission_id 459
Removing orphaned submission_files entry ID 2934 with submission_id 498
A submission file was expected but not found at journals/1/articles/1/submission/1-1-1-1-2-20120131.doc.
A submission file was expected but not found at journals/1/articles/1/submission/1-12-2-1-2-20120131.doc.
A submission file was expected but not found at journals/1/articles/1/submission/review/1-1-3-1-4-20120131.doc.
A submission file was expected but not found at journals/1/articles/5/submission/5-2-6-1-2-20120319.jpg.
A submission file was expected but not found at journals/1/articles/6/submission/6-1-7-1-2-20120319.doc.
A submission file was expected but not found at journals/1/articles/7/submission/7-1-8-1-2-20120320.doc.
A submission file was expected but not found at journals/1/articles/9/submission/9-1-11-1-2-20120416.doc.
A submission file was expected but not found at journals/1/articles/9/submission/9-12-12-1-2-20120416.jpg.
A submission file was expected but not found at journals/1/articles/10/submission/10-1-13-1-2-20120509.doc.
A submission file was expected but not found at journals/1/articles/10/submission/10-4-14-2-2-20120509.doc.
A submission file was expected but not found at journals/1/articles/10/submission/review/10-1-15-1-4-20120509.doc.
A submission file was expected but not found at journals/1/articles/51/submission/51-1-183-4-2-20150612.phtml.
A submission file was expected but not found at journals/1/articles/152/submission/152-1-643-2-2-20160524.phtml.
A submission file was expected but not found at journals/1/articles/152/submission/review/152-1-644-1-4-20160524.phtml.
A submission file was expected but not found at journals/1/articles/152/submission/152-12-645-1-2-20160524.phtml.
A submission file was expected but not found at journals/1/articles/178/submission/178-1-765-1-2-20161005.phtml.
A submission file was expected but not found at journals/1/articles/10/submission/copyedit/10-1-801-1-9-20161109.doc.
A submission file was expected but not found at journals/1/articles/190/submission/190-1-830-3-2-20161124.phtml.
A submission file was expected but not found at journals/1/articles/198/submission/198-1-868-2-2-20161219.html.
A submission file was expected but not found at journals/1/articles/258/submission/258-1-1176-3-2-20170818.html.
A submission file was expected but not found at journals/1/articles/404/submission/fairCopy/404-1-2328-2-7-20191022.pdf.
A submission file was expected but not found at journals/1/articles/421/submission/review/421-1-2400-1-4-20191218.docx.
Removing orphaned review_files entry with review_id ID 712 and submission_file_id 2511
Removing orphaned review_files entry with review_id ID 1079 and submission_file_id 3812
Removing orphaned review_files entry with review_id ID 1113 and submission_file_id 3999
Removing orphaned review_files entry with review_id ID 1200 and submission_file_id 4309
2022-11-22 11:23:38 [migration: OJSv3_3_0UpgradeMigration]
2022-11-22 11:23:40 [note: docs/release-notes/README-3.3.0]
2022-11-22 11:23:40 [code: Installer Installer::addPluginVersions]
2022-11-22 11:23:41 [post-install]

Everything seems to work correctly except the activity log.

Infinite loading wheel:

In the error log I have the following lines:

[30-Nov-2022 13:06:17 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 14:20:40 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 14:27:46 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 14:28:29 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 14:29:58 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 14:55:40 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 14:59:26 Europe/Berlin] PHP Notice:  Undefined index: stageId in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 15:02:18 Europe/Berlin] PHP Warning:  Undefined array key 0 in /[pathToOJS]/plugins/generic/customLocale/controllers/grid/CustomLocaleAction.inc.php on line 28
[30-Nov-2022 15:27:48 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 15:34:35 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 15:37:30 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 15:40:30 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 15:40:55 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 16:33:04 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 16:51:33 Europe/Berlin] PHP Warning:  Undefined array key 0 in /[pathToOJS]/plugins/generic/customLocale/controllers/grid/CustomLocaleAction.inc.php on line 28
[30-Nov-2022 16:51:50 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111
[30-Nov-2022 16:54:43 Europe/Berlin] PHP Warning:  Undefined array key "stageId" in /[pathToOJS]/lib/pkp/controllers/grid/eventLog/SubmissionEventLogGridHandler.inc.php on line 111

I found this [OJS] PHP Warning and fatal error · Issue #6774 · pkp/pkp-lib · GitHub, tried the SQL statements and there where some orphaned submission_file_ids:


I deleted them (after database backup), but issue remains.

I found this Activity log doesn't load [OJS 3.3.0.6] - #14 by Elton_Pereira_Leite, but it’s not very clear, what to try or to do.

Please give me a hint, where to start investigating our issue.

Thanks,
Tobias

@twa Hello we found the solution, we ran the commands below and solved it.

I made a backup of your database before this action to be able to restore!

SELECT sf.submission_file_id FROM submission_files sf LEFT JOIN notes n ON (sf.assoc_id = n.note_id) WHERE sf.assoc_type = 520 AND n.note_id IS NULL;

DELETE FROM submission_file_revisions WHERE submission_file_id IN (SELECT sf.submission_file_id FROM submission_files sf LEFT JOIN notes n ON (sf.assoc_id = n.note_id) WHERE sf.assoc_type = 520 AND n.note_id IS NULL);

delete from submission_files where submission_file_id in (
SELECT sfid FROM (SELECT sf.submission_file_id AS sfid FROM submission_files sf
LEFT JOIN notes n ON (sf.assoc_id = n.note_id) WHERE sf.assoc_type = 520 AND n.note_id IS NULL) AS c);

@Elton_Pereira_Leite Thanks for your help.

Running the 1st SQL I get 0 hits.
Running the 2nd SQL I get 0 hits.
Running the 3rd SQL I get an SQL error:

Unexpected sign (near ")" at position 181)

as c); at the end of the statement appears to be wrong.

Thanks
Tobias

I do not exactly know why, but now the activity log works! Directly after applying the SQL command it hasn’t.
So: Issues is closed for us.

I have to correct me: Now there are some submissions, where the Activity Log is not working, and others, where it is working.
Any further ideas?

@asmecher Sorry for forcefully dragging you into this topic, but I can’t see a solution to this, and before the upgrade everything worked fine.

Thank you!
Tobias

I have same issue after upgrade OMP from 3.1.1.3 to 3.3.0.13 - Activity Log is not working.
now a make a clear instalation of OMP 3.3.0.13 and have same issue on “Activity Logs”

how do you solve in OJS?