When upgrading a journal from OJS-2.4.8-3 to OJS-3.1.1-.4, some unexpected values end up in these database tables:
-
submission_files
: theuploader_user_id
fields are all set to a journal manager user ID (43 in this example), instead of the author user ID (587, in this case)
-
submission_file_settings
: thename
fields also contain the journal manager login name (rvandenbranden) instead of the author’s name (Lori Van Biervliet, in this case)
The result is that in the journal administrator interface all articles list “rvandenbranden” as author in the submission file name labels, which is incorrect, and rather confusing. Also, it makes me wonder if this is a symptom of a real underlying problem in the upgrade process (although the upgrade output doesn’t log any errors whatsoever).
I’ve tested with a database from another journal, which does come out as expected, i.e. with the actual author user IDs instead of the journal manager’s. Yet, I don’t see any substantial differences between both original OJS-2.4 databases.
I’m really struggling with this; so far I’ve been unable to find a real cause, although I could find some traces:
- The MySQL instructions in the debug output seem to suggest that the
submission_files
table is constructed first, from which thesubmission_file_settings
table is derived later on. For some reason, theuploader_user_id
field is calculated wrongly in the former table. - I’ve found a function
setFileUploader
in https://github.com/pkp/ojs/blob/master/classes/install/Upgrade.inc.php#L980, which, according to its documentation comment will “Set the missing uploader user id to a journal manager.” This seems to be what’s happening here, but I don’t have a clue why, and how to fix it.
I’m not a PhP or MySQL expert and am really struggling to get this upgrade right. Is there someone knowledgeable around here who can help me out?