SOLVED Upgrade error 3.0.1.0 to 3.1.0.1

Good Morning,

I found this errors in my web server when I upgraded my installation:

[Wed Apr 04 10:39:51.725827 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP Strict standards: Declaration of SubmissionFileDAO::fromRow() should be compatible with PKPSubmissionFileDAO::fromRow($row, $fileImplementation) in C:\wamp\www\ojs.herpetos.org\classes\article\SubmissionFileDAO.inc.php on line 23, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP Stack trace:, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 1. {main}() C:\wamp\www\ojs.herpetos.org\index.php:0, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 2. PKPApplication->execute() C:\wamp\www\ojs.herpetos.org\index.php:68, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 3. Dispatcher->dispatch() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\core\PKPApplication.inc.php:243, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 4. PKPPageRouter->route() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\core\Dispatcher.inc.php:134, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 5. PKPRouter->_authorizeInitializeAndCallRequest() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\core\PKPPageRouter.inc.php:233, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 6. call_user_func() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\core\PKPRouter.inc.php:372, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 7. InstallHandler->installUpgrade() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\core\PKPRouter.inc.php:372, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 8. UpgradeForm->execute() C:\wamp\www\ojs.herpetos.org\lib\pkp\pages\install\InstallHandler.inc.php:104, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 9. Installer->execute() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\install\form\UpgradeForm.inc.php:40, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 10. Installer->executeInstaller() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\install\Installer.inc.php:186, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 11. Installer->executeAction() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\install\Installer.inc.php:265, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 12. call_user_func() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\install\Installer.inc.php:415, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 13. Upgrade->fixGenreIdInFileNames() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\install\Installer.inc.php:415, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 14. DAORegistry::getDAO() C:\wamp\www\ojs.herpetos.org\classes\install\Upgrade.inc.php:2465, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 15. instantiate() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\db\DAORegistry.inc.php:68, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726327 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 16. import() C:\wamp\www\ojs.herpetos.org\lib\pkp\includes\functions.inc.php:203, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.726827 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 17. require_once() C:\wamp\www\ojs.herpetos.org\lib\pkp\includes\functions.inc.php:25, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP Fatal error: Call to a member function getId() on a non-object in C:\wamp\www\ojs.herpetos.org\classes\install\Upgrade.inc.php on line 2480, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP Stack trace:, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 1. {main}() C:\wamp\www\ojs.herpetos.org\index.php:0, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 2. PKPApplication->execute() C:\wamp\www\ojs.herpetos.org\index.php:68, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 3. Dispatcher->dispatch() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\core\PKPApplication.inc.php:243, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 4. PKPPageRouter->route() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\core\Dispatcher.inc.php:134, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 5. PKPRouter->_authorizeInitializeAndCallRequest() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\core\PKPPageRouter.inc.php:233, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 6. call_user_func() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\core\PKPRouter.inc.php:372, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 7. InstallHandler->installUpgrade() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\core\PKPRouter.inc.php:372, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 8. UpgradeForm->execute() C:\wamp\www\ojs.herpetos.org\lib\pkp\pages\install\InstallHandler.inc.php:104, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 9. Installer->execute() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\install\form\UpgradeForm.inc.php:40, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 10. Installer->executeInstaller() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\install\Installer.inc.php:186, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 11. Installer->executeAction() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\install\Installer.inc.php:265, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 12. call_user_func() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\install\Installer.inc.php:415, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade
[Wed Apr 04 10:39:51.751831 2018] [:error] [pid 9240:tid 868] [client ::1:55226] PHP 13. Upgrade->fixGenreIdInFileNames() C:\wamp\www\ojs.herpetos.org\lib\pkp\classes\install\Installer.inc.php:415, referer: http://localhost/ojs.herpetos.org/index.php/index/install/upgrade

Can somebody explain me what happened?
Thank You.

Hi @tecnico3

As far as I can see, this is the important error message:

PHP Fatal error: Call to a member function getId() on a non-object in C:\wamp\www\ojs.herpetos.org\classes\install\Upgrade.inc.php on line 2480

The other messages, the strict standard messages, you can ignore. You could even try to configure your server PHP errors so that those messages are not logged.

According to that error message it seems like something is not correct with entries in your DB table genres. There was a known problem/issue that the default keys were missing there. Could you please take a look in your old DB table genres and tell me what you see there?

Thanks!
Bozana

Hello @bozana

Thank You for your quickly answer, I send You the table genres:

genres

It´s very important to upgrade the installation as sooner as possible.

Thank You so much.

Hello Everybody,

I have solved the problem restoring to defaults the workflow of components and after upgrading the installation.

Thank You all for the help.

We got the same problem
“PHP Fatal error: Uncaught Error: Call to a member function getId90 on null in /var/www/periodicos/classes/install/Upagrade.inc.php: 2480”
Can you help us? We need some details about your solution.VirtualBox_Revista_04_04_2018_16_38_23

Hello @Suporte,

You have to restore your Database and your Installation from your last backup before the upgrade.

Then, You have to log as administrator in your installation and go to the administration pannel, enter in the workflow screen and go to the components zone.

Once You are in the components zone, restore defaults and try to upgrade the installation following the instructions of OJS.

I hope I help You.

Thank you so much! But unfortunately we have another error. VirtualBox_Revista_06_04_2018_18_01_56
We really appreciate your support.

Hi @Suporte

Hmmm… I am not sure what dose warnings about a scalar value are…

The error “Reviewer files with ID … from review assignment … could not be found in the database table submission_files” means, that you have, for some reason, the reference to a file in the DB table review_assignments, but that file is actually not any more in the DB table submission_files, where all the files should be.
You could maybe double check those reviews in your old installation and if necessary either upload the correct review file again, or you could set NULL for those reviewer_file_ids in your DB table review_assignments.
Do not forget to always make a backup, before any changes i.e. the original state, as well as after a change!!! And always, for each upgrade attempt, restore the last backup!!!

Regarding the message “Duplicate entry … for key review_round_files_pkey”: please execute this SQL on your old DB: SELECT * FROM articles WHERE revised_file_id = review_file_id.
Post the results here, then we will see what next…

Best,
Bozana

Hi Bozana, we got the massage: ERROR 1146 (42S02): Table ‘portalseer.articles’ doesn’t exist
VirtualBox_Revista_11_04_2018_15_37_32

Hi @Suporte,

I see you’ve also posted this error over at your other thread – please don’t double-post, as it can result on several people working independently on the same problem.

Regards,
Alec Smecher
Public Knowledge Project Team

Sorry,
Do you want me to delete one of them?

Hi @Suporte

Hmmm… Is this your OJS 2.4.x Database that you would like to migrate?
What is actually you old OJS version, that you would like to upgrade?

Best,
Bozana

Our atual version is: 3.0.2.0 and we trying to migrate to 3.1.0.1.

Best,
Suporte

Ah… Yes, then there is no DB table articles…
Hmm…
Could you execute these SQLs on your old 3.0.2.0 DB:
SELECT sf.file_id, sf.revision FROM review_assignments ra, submission_files sf WHERE sf.file_id = ra.reviewer_file_id
and
SELECT rrf.* FROM review_round_files rrf, review_assignments ra, submission_files sf WHERE rrf.file_id = ra.reviewer_file_id AND sf.file_id = ra.reviewer_file_id AND rrf.revision = sf.revision

and then send me the results?

Best,
Bozana

We performed the two tests, in response we had:
Result 1: Result 1 - Google Sheets

Result 2:Result%202

Best,
Suporte

Hi Suporte,

Could you please do one more SQL:
SELECT ra.submission_id, ra.review_round_id, ra.reviewer_file_id, sf.revision FROM review_assignments ra, submission_files sf WHERE ra.reviewer_file_id = 2984 AND sf.file_id = ra.reviewer_file_id

Thanks!
Bozana

Hi Bozana,
We got this:
Teste%203%20-%20MYSQL
Sorry for taking so long

Regards,
Suporte

Hi @Suporte

Hmmm… It seems like you would have several review assignments with the same reviewer file id = 2984 in your old installation. Could you take a look in your UI, the submission with the id = 759, review stage: how many reviewers have you assigned there and do you see how could it be that they all have that same file id?

Thanks!
Bozana

We had a reviewer appear several times on the evaluation tab, but in an old version of the system, which was not done by the current team at the time.
The file in question was from OJS version 2.4.2.0.
What did you suggest?
Thank you so much in advance.

Regards,
Suporte

Hi @Suporte

I think you should remove those additional review assignments containing the same entries. But before doint that, maybe to check if there are any dependencies in the DB to consider. So could you please first do:

  1. First see all review assignments for that review round
    SELECT ra.* FROM review_assignments ra WHERE ra.submission_id = 759 AND ra.review_round_id = 606
  2. Then check if there is any review form response for those review assignments:
    SELECT rr.* FROM review_form_responses rr, review_assignments ra WHERE rr.review_id = ra.review_id AND ra.submission_id = 759 AND ra.review_round_id = 606
  3. And finally see if there are any notifications for those review assignments:
    SELECT n.* FROM notifications n, review_assignments ra WHERE n.assoc_type = 517 AND n.assoc_id = ra.review_id AND ra.submission_id = 759 AND ra.review_round_id = 606

If you could post me the results, I will see as well, then I can tell what everything should be deleted…

Thanks!
Bozana