Upgrading from OJS 2.4.8 to 3.1.1.4 - problems with application after upgrade

We are trying to upgrade from OJS 2.4.8 to OJS 3.1 .


Path to the upgrade

Before attempting the upgrade, we moved to a PHP 5.6 server. From that, there were some errors with duplicate characters in the database tables related to full search.
We dropped:
article_search_keyword_list
article_search_object_keywords
article_search_objects
See forum post at OJS full upgrade - #5 by asmecher for more info on those tables. They are powering full text article search (text extracted from PDFs, if the PDF had a text layer).
We did not reindex the full text.

We ran the upgrade script.

There were some errors like,

ERROR: Reviewer files with ID 77473 from review assignment 61 could not be found in the database table submission_files
ERROR: Reviewer files with ID 97751 from review assignment 452 could not be found in the database table submission_files
ERROR: Reviewer files with ID 101597 from review assignment 773 could not be found in the database table submission_files
ERROR: Reviewer files with ID 104983 from review assignment 1131 could not be found in the database table submission_files
ERROR: Reviewer files with ID 110312 from review assignment 1589 could not be found in the database table submission_files
ERROR: Reviewer files with ID 110736 from review assignment 1664 could not be found in the database table submission_files
ERROR: Reviewer files with ID 111791 from review assignment 1681 could not be found in the database table submission_files
ERROR: Reviewer files with ID 113925 from review assignment 1974 could not be found in the database table submission_files
ERROR: Reviewer files with ID 117399 from review assignment 2404 could not be found in the database table submission_files
ERROR: Reviewer files with ID 133162 from review assignment 2930 could not be found in the database table submission_files
ERROR: Reviewer files with ID 138359 from review assignment 4570 could not be found in the database table submission_files
ERROR: Reviewer files with ID 142800 from review assignment 5390 could not be found in the database table submission_files
ERROR: Reviewer files with ID 143308 from review assignment 5801 could not be found in the database table submission_files
ERROR: Reviewer files with ID 143425 from review assignment 5844 could not be found in the database table submission_files
ERROR: Reviewer files with ID 145622 from review assignment 6309 could not be found in the database table submission_files

Nevertheless, the script returned at the end with “Successfully upgraded to version 3.1.1.4”

We researched the errors like, “ERROR: Reviewer files with ID xxxxxxxxx from review assignment xxxxxxxxx could not be found in the database table submission_files”. We were unsure what the fix was and whether those errors will cause a problem, since they are not fatal error. So, we did not fix these, and are now trying to use the upgrade.

Background on the errors like: “ERROR: Reviewer files with ID xxxxxxxxx from review assignment xxxxxxxxx could not be found in the database table submission_files”

From this thread, Upgrade OJS 2.4.8 to OJS 3.1 failed with PHP Fatal error: Call to a member function getContextId() on null in ReviewAssignment.inc.php on line 517 , someone resolved this error with submission_file by deleting the rows of the database in the review_assignments table.
User’s question starts with:
“I have read in this topic ‘Error Upgrade 2.4.8.2 to 3.1.0 9’, there said for resolve the error:
ERROR: Reviewer files with ID 168293 from review assignment 6823 could not be found in the database table submission_files
We have to remove the rows in the review_assignments table where the reviewer_file_id field is in (168293, 168947) for my specific case, then I had tried the upgrading process with a clean database restore again” then user describes a new problem, and the rest of the post is about that new problem.

The referenced thread, “Error Upgrade 2.4.8.2 to 3.1.0” Error Upgrade 2.4.8.2 to 3.1.0 - #15 by bozana
User’s question starts with:
“I have read in this topic ‘Error Upgrade 2.4.8.2 to 3.1.0 9’, there said for resolve the error:
ERROR: Reviewer files with ID 168293 from review assignment 6823 could not be found in the database table submission_files
We have to remove the rows in the review_assignments table where the reviewer_file_id field is in (168293, 168947) for my specific case, then I had tried the upgrading process with a clean database restore again”
then user describes a new problem, and the rest of the post is about that new problem.
Second useful PKP Forum entry:
Error Upgrade 2.4.8.2 to 3.1.0 - #16 by Adriano_Jose - The user had the same kind of error of submission_files table.
Bozana’s advice:
“Those should be the files that a reviewer uploaded for a review. It seems that those files are not in the DB article_files. There are entries in the DB table review_assignments, but the files are not in the DB table article_files. Could you take a look in the DB table article_files and see if there are those files, with ids = 5871, 6899, 6694, etc. – you should not look after the article_id but file_id there? Could you also see if they are in the files folder – they should be in journals//articles//submission/review/?
And again, see what is the correct solution for your journals – are those files needed or not…”
User’s fix (after doing this, user posted with the exact same error message - same submission_files error message on same exact articles):
“Finally I understood. The reviewer_file_id that is in the review_assignments table does not exist in the article_files table. So I deleted those records from the review_assignments table.”
Bozana’s reply:
“Hmmm… you have the same error messages again. Maybe you did not removed the correct rows?
Either you should delete those entries from your DB table review_assignments where review_file_id is in (5871, 6899, 6694, 9692, 16668, 19075, 28125, 28613, 42013, 44439, 48910, 47250)
Or
where review_id is in (696, 872, 884, 1457, 3323, 4319, 6585, 6584, 10427, 10663, 11938, 12106).
(Also, did you check if the files are in the files folder?)
How many comments to editor (column name comments_to_ed) do you have in your DB table articles? It seems that one of them contains HTML elements that are not supported :open_mouth:
And concerning the installDefaultNavigationMenus errors: What do you have in your DB table site, in the column supported_locales?”

In that longer thread “Error Upgrade 2.4.8.2 to 3.1.0”, we could not see that the person resolved the error. Also, the posts were from late 2017. So, we did not try to fix the error, and instead, we are now trying to use the upgraded site which had errors like, "“ERROR: Reviewer files with ID xxxxxxxxx from review assignment xxxxxxxxx could not be found in the database table submission_files” in the log of the upgrade script.

Permissions on all code in /ojs-3.1/ (ie. the OJS code) are all 775. Permissions on the directories holding article uploads and on all PDFs are 775. These permissions were adjusted after running the upgrade script. My understanding is that the script runs on the database and uploaded article files only, and does not alter the code.


Current problems with the upgrade

Problems in the site:

This error message shows at the top of the homepage and most (maybe all?) logged in views:
“Scalar value as an array in /var/www/ojs-3.1/lib/pkp/classes/core/DataObject.inc.php on line 133”

On journal homepages, these warnings show up:
Warning: mkdir(): Permission denied in /var/www/ojs-3.1/lib/pkp/classes/file/FileManager.inc.php on line 289
Warning: assert(): Assertion failed in /var/www/ojs-3.1/lib/pkp/plugins/generic/usageStats/PKPUsageStatsPlugin.inc.php on line 587
The same error about “Scalar value as array” shows up on some journal home pages, but not all.
Errors are the same logged in or logged out.

In all logged in views, the menu bar along the very top which should have “Tasks”, “View Site”, a link to my user profile, etc. never loads, and instead this top menu bar area has a spinner and a message saying “Loading” but the menu items never load.

I can’t get to most views as site admin. I can see the Administrator home page at /index/admin/index . I can’t click into any admin areas, though. When I click into “Hosted Journals”, “Site Settings”, or “System Information”, I get a spinner in the main content area and the spinner stays forever - the page never fully loads to give me content.

In all journals, I can get to the main admin area for the journals (ie. I can get to site_root/journal_path/admin ).
For most journals, I can see future issues and back issues. For some articles, I can click in and delete the submission. For most, I get a message that “You don’t currently have access to that stage of the workflow.” This message pops up even if I add many roles on that account to my user account.
For most journals, I can get to Settings, Masthead/Contact/Sections and change settings and save.
Same for other admin areas. I can see them for some journals, but not others. I do see that the number of times the “Scalar value as an array in /var/www/ojs-3.1/lib/pkp/classes/core/DataObject.inc.php on line 133” error repeats fluctuates, and when it doesn’t show up on a journal admin area, that’s when I can view and change settings.

We worked through this forum post: Cannot use a scalar as an array

We think the site problems are related to the locale.


Questions

Is anything about the path to the upgrade amiss (dropping the full text search tables, having the unresolved error messages, setting permissions on the server as 775 for all code and files as opposed to something more granular)?

Could someone give pointers what to check with the locale?

When we turn on php error reporting and check the php error log on the server, we see errors referencing pid . What is “pid” and how can we tie that to a specific record that may be causing trouble?