Upgrade from OJS 2.4.7 to 3.0.1 fails

Hi @akku

Hmmm…

It seems like you would get only one row when executing that new SQL:
SELECT a.journal_id, sf.* FROM article_supplementary_files sf, articles a WHERE a.article_id = sf.article_id AND sf.file_id <> 0 AND sf.show_reviewers = 1 AND sf.remote_url IS NULL

That would be this line, I think:
| 519 | 7763 | 5085 | | | NULL | 2016-08-30 | 1 | 2016-08-30 13:50:48 | 2 |

And it seems like something goes wrong here ojs/Upgrade.inc.php at ojs-3_1_1-2 · pkp/ojs · GitHub – maybe that that file could not be copied so that there is no newFileId there.

Do you have that file in your DB and files folder? – In the DB table article_files there should be a file with the ID = 7763. And can you find that file somewhere in your files folder, for that article 5085?

You would also need to address all the previous upgrade warnings: I see there were for example some warnings about some missing files, e.g. “WARNING: Unable to find a match for “5078-7748-1-LE.docx” in “/opt/ojs-obib-files/journals/8//articles/5078/”. Skipping this file.”
This warning/error means that the file was found in the DB, but not in the files folder and thus it could not be migrated/upgraded properly.
It would be best to go to those files using the GUI and upload the correct files again or delete them – do this via the GUI, in order to keep/remove all needed dependencies in the DB correctly.

Best,
Bozana

1 Like

Hi @bozana,

thank you for your great support! I checked the three incorrect db entries, deleted the first entry (file id 7763) and corrrected the other database entries or file names.

After these corrections the upgrade script ran without problems :smile::tada:

best regards,
Anna

1 Like

Hi @bozana, i’m having same issue when upgrading from 2.4.8 to 3.1.1.2. This is my upgrade log https://paste.fedoraproject.org/paste/ider0w0WRY6ctf0gXeX8Ng

And running the mention SQL i get this: https://snag.gy/trJhYl.jpg

Really doesn’t know which record i should erase. Thanks.

I was able to fix, see: Upgrade OJS 2.4.8 to OJS 3.1: Error in version - #18 by lucasdiedrich