[Solved] Upgrading 3.0.2 to 3.1.01 moveReviewerFiles fails

Hi,

Any idea why the moveReviewerFiles function fails with the error below. The whole files folder should be readable and writable. I am running the upgrade using the comman line tool. Any ideas, @asmecher?

[code: Installer Installer::moveReviewerFiles]
ERROR: Reviewer files with ID 6311 from review assignment 125 could not be found in the database table submission_files
PHP Warning:  rename(/var/www/server.fi/files/journals/30//articles/2545/submission/review/attachment/2545-121-6773-4-5-20100506.doc,/var/www/server.fi/files/journals/30//articles/2545/submission/review/attachment/2545-121-6773-4-5-20100506.doc): Tiedostoa tai hakemistoa ei ole in /var/www/server.fi/public_html/classes/install/Upgrade.inc.php on line 2003
ERROR: Unable to move "/var/www/server.fi/files/journals/30//articles/2545/submission/review/attachment/2545-121-6773-4-5-20100506.doc" to "/var/www/server.fi/files/journals/30//articles/2545/submission/review/attachment/2545-121-6773-4-5-20100506.doc".
ERROR: Reviewer files with ID 15845 from review assignment 716 could not be found in the database table submission_files
ERROR: Reviewer files with ID 16355 from review assignment 717 could not be found in the database table submission_files
ERROR: Reviewer files with ID 17598 from review assignment 855 could not be found in the database table submission_files
ERROR: Reviewer files with ID 22508 from review assignment 1449 could not be found in the database table submission_files
ERROR: Reviewer files with ID 22208 from review assignment 1395 could not be found in the database table submission_files
ERROR: Reviewer files with ID 24901 from review assignment 1537 could not be found in the database table submission_files
<h1>There are no readable files in this directory tree. Are safe mode or open_basedir active?</h1>ojs2: There are no readable files in this directory tree. Are safe mode or open_basedir active?

I am running the script as the root user, so really do not understand where that error comes from. I added an error_log there to see what is happening. The error came from the install.php script from line 2000. It includes a mkdirtree command so I will now try to print out the path that is the value given there. ojs/Upgrade.inc.php at ojs-stable-3_1_0 · pkp/ojs · GitHub

weird weird weird

The submission where the error happened was id 2545 in journal 30

I saw this issue Upgrade from OJS 2.4.7 to 3.0.1 fails - #18 by asmecher and used the sql you have there. I found out that there were submissions left in the system from two journals that have been removed some time ago (journals 45 and 67) and these had left behind some submissions which I removed.

That was all I did, but after that the upgrade has now passed the moveReviewerFiles function.

I am clueless what happened, any idea @asmecher?

edit: Also, does removing a journal leave the items in submissions table intact at the moment?

Hi @ajnyga,

Do you know what version of OJS you were running when you deleted the journals? Do you remember off the top of your head whether the “delete” operation finished, or whether the spinner was left endlessly spinning?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

The version was definitely already 3.0.2. But I was not the one who deleted those journals, so not 100% what has happened. And I am very sure, that the person who deleted those would not remember…

Hi @ajnyga,

The “delete journal” function received some maintenance last year, so it’s entirely possible that it was broken at the time it was used. (It’s not a very commonly used operation so receives little practical testing.) One way to track this down would be to look through your access logs for deleteContext, identify the date/time of deletion, and correlate that against your PHP error log from the same time. If the function was broken, you’d see a fatal error from that time.

Regards,
Alec Smecher
Public Knowledge Project Team

It could very well be that the journals were just removed in some weird way. I am cleaning our database and could not find anymore submissions for missing journals, so we are hopefully in clear waters.

Hi @ajnyga

For future references, I think the solution is the one Alec posted here:

If you remember it was your case, please confirm to flag this as a solution and close the post.

Take care,
m.