Upgrade fail/problems ojs 2.4.5 to 3.0.1

Hello @bozana,

how should i do to create the anonymized db dump? The best way to fit your needs.

Thank you,
Best regards

Hi @digitojs

At least set the columns username, password, first_name, last_name, email in the table users to some anonym values. They could all have the same values. Also remove entries in the columns phone, fax, mailing_address, billing_address.

Best,
Bozana

Hello,

I’ve checked all the journals and files.
About the missing files: the ones from the last performed test, are all missing. From single files like jpg and pdf, to article folders as a whole, like /journals/8//articles/2570/ or /journals/6//articles/2075/, and as a consequence all the files it reports are missing and should be inside. I have no explanation for this, they don’t existe in my files_dir.

As for the journal managers, i’ve checked all these journal_ids and the journals exist. And they all have roles and users, they all have journal managers, including my admin user (only for journal_id 3 my admin user was not a journal manager, and i add it).

My 2.4.5 version runs fine, i had no problems restoring it, so what should i do? If i try the upgrade i’ll get the same issues for sure.

Thank you,
Best regards

Hi @digitojs

I am afraid that you will then have to restore that missing files :frowning: They should be restored in the “raw” files_dir in the appropriate subfolder – maybe then check via GUI that they work fine.

I see you are using ALM plugin, right? I am not sure it works with OJS 3.x, so maybe to remove that for now. Is there maybe any other plugin that you are using but it is not within the release?

Best,
Bozana

Hello @bozana,

I’ll restore the files to test it again.
Did you receive my email with the DB?
The plugins that it complains in previous logs are ALM, PLN and usagestats. I didn’t find information about them in the release docs, do you know if they are problematic? I’ll have to disable them journal by journal?

Thank you!
Best regards,

Hi @digitojs

UsageStats should be fine and work properly. ALM and PLN are not in the OJS 3.0.2 release, thus they can be removed totally (either from the OJS 2.4.5 installation or manually in the code and DB (I believe from DB tables plugins and versions)).

Best,
Bozana

Hello @bozana.

I’m restored the files and the errors were gone, no more problems.
I removed the ALM and PLN entries in DB, tried the upgrade and the same errors appeared.
And when i try to access the OJS link, i get the same errors about ALM, PLN in log…I don’t understand and don’t know what to do.

Thank you,
Best regards

Hello,

when running the upgrade script, it stumbles and crashes here:

[code: Installer Installer::setFileUploader]

Fatal error: Call to a member function getId() on a non-object in /var/www/html/ojs32/classes/install/Upgrade.inc.php on line 930

in httpd log when i try to access OJS homepage (which opens but a blank page with journals titles), it delivers:

PHP Warning: require_once(/var/www/html/ojs3test2/plugins/generic/alm/ArticleInfoSender.inc.php): failed to open stream: No such file or directory in /var/www/html/ojs3test2/lib/pkp/includes/functions.inc.php on line 25

PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/ojs3test2/plugins/generic/alm/ArticleInfoSender.inc.php’ (include_path=’.:/var/www/html/ojs3test2/classes:/var/www/html/ojs3test2/pages:/var/www/html/ojs3test2/lib/pkp:/var/www/html/ojs3test2/lib/pkp/classes:/var/www/html/ojs3test2/lib/pkp/pages:/var/www/html/ojs3test2/lib/pkp/lib/adodb:/var/www/html/ojs3test2/lib/pkp/lib/phputf8:/var/www/html/ojs3test2/lib/pkp/lib/pqp/classes:/var/www/html/ojs3test2/lib/pkp/lib/smarty:.:/usr/share/pear:/usr/share/php’) in /var/www/html/ojs3test2/lib/pkp/includes/functions.inc.php on line 25

PHP Warning: require_once(/var/www/html/ojs3test2/plugins/generic/pln/classes/tasks/Depositor.inc.php): failed to open stream: No such file or directory in /var/www/html/ojs3test2/lib/pkp/includes/functions.inc.php on line 25

PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/ojs3test2/plugins/generic/pln/classes/tasks/Depositor.inc.php’ (include_path=’/var/www/html/ojs3test2/lib/pkp/lib/vendor/ezyang/htmlpurifier/library:.:/var/www/html/ojs3test2/classes:/var/www/html/ojs3test2/pages:/var/www/html/ojs3test2/lib/pkp:/var/www/html/ojs3test2/lib/pkp/classes:/var/www/html/ojs3test2/lib/pkp/pages:/var/www/html/ojs3test2/lib/pkp/lib/adodb:/var/www/html/ojs3test2/lib/pkp/lib/phputf8:/var/www/html/ojs3test2/lib/pkp/lib/pqp/classes:/var/www/html/ojs3test2/lib/pkp/lib/smarty:.:/usr/share/pear:/usr/share/php’) in /var/www/html/ojs3test2/lib/pkp/includes/functions.inc.php on line 25

PHP Warning: require_once(/var/www/html/ojs3test2/classes/tasks/ReviewReminder.inc.php): failed to open stream: No such file or directory in /var/www/html/ojs3test2/lib/pkp/includes/functions.inc.php on line 25

PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/ojs3test2/classes/tasks/ReviewReminder.inc.php’ (include_path=’/var/www/html/ojs3test2/lib/pkp/lib/vendor/ezyang/htmlpurifier/library:.:/var/www/html/ojs3test2/classes:/var/www/html/ojs3test2/pages:/var/www/html/ojs3test2/lib/pkp:/var/www/html/ojs3test2/lib/pkp/classes:/var/www/html/ojs3test2/lib/pkp/pages:/var/www/html/ojs3test2/lib/pkp/lib/adodb:/var/www/html/ojs3test2/lib/pkp/lib/phputf8:/var/www/html/ojs3test2/lib/pkp/lib/pqp/classes:/var/www/html/ojs3test2/lib/pkp/lib/smarty:.:/usr/share/pear:/usr/share/php’) in /var/www/html/ojs3test2/lib/pkp/includes/functions.inc.php on line 25

what is going on? those files don’t exist in those classes in OJS3 anymore, but in lib/pkp/…

Thank you,
Best regards

Hi @digitojs

Hmm… strange…
The error you get when running the upgrade script means that no journal manager user was find :frowning: – all files in OJS 3.x need an upload user. In OJS 2.4.x there was no such information there, thats why the upgrade script takes the first journal manager found and assigns him/her as the file uploader in that function.
Could you maybe print out some variables directly before that line in the code (ojs/Upgrade.inc.php at ojs-3_0_2-0 · pkp/ojs · GitHub), for example $managerUserGroup->getId(), $journal->getId() and $managerUsers? – so that we can see where is the problem exactly…

I have no idea what are the other warnings and errors :-\ Could you maybe try to install a clean/new OJS 3.0.2? When you succeed, use that code, but your DB, config.in.php, plugins_dir and files_dir for the update. Also remove *.php, *.css, HTML from cache/ and cache/t_compile/.

Best!
Bozana

Hello @bozana,

The variables you asked, when running the update, are:

journalID: 23
managerusergroupID: 2
managerUsers: 1986

journalID: 28
managerusergroupID: 19
managerUsers: 1986

journalID: 32
managerusergroupID: 36
managerUsers: 1810

journalID: 14
managerusergroupID: 53
managerUsers: 1986

journalID: 22
managerusergroupID: 70
managerUsers: 201

journalID: 15
managerusergroupID: 87
managerUsers: 1986

journalID: 33
managerusergroupID: 104
managerUsers: 48

journalID: 5
managerusergroupID: 121
managerUsers: 88

journalID: 45
managerusergroupID: 138
managerUsers: 1

journalID: 19
managerusergroupID: 155
managerUsers: 1

journalID: 36
managerusergroupID: 172
managerUsers: 1986

journalID: 37
managerusergroupID: 189
managerUsers: 1986

journalID: 9
managerusergroupID: 206

this is the exact output, there is no last managerUsers. I’m looking more deep into it, what do you think could be the cause of this?

Thank you,
Best regards

I need to perform another test, there were some hidden journals that should be responsible for this.
I’ll let you know.

Thank you,
Best regards

Hello,

This journal, number 9, was inactive and had no journal manager. I added my admin user, as in all other journals, and made a copy of the files and the DB. Then, I tried the upgrade again. Same problem, but this time when running all the journals:

journalID: 9
managerusergroupID: 206
managerUsers:

it printed the “managerUsers” string but with no variable. So, if I previously added a journal manager, why is it missing again?

Thank you,
Best regards

Hmmm… I think the admin user has explicitly journal manager rights, so maybe this user is not considered with this code… hmm… Would it be possible for you to take another user as journal manager? Else, I will see to consider the admin user in that case and will let you know about the patch for the code…
Thanks!
Bozana

Hello @bozana,

I’ll add another user as journal manager and let you know if it was successful.

Thank you!
Best regards

Hello @bozana,

Thank you for your help, the upgrade finally ended up with success, no error messages, nothing to report!
Now, aside from incomplete locales, the journals UI need to be customized as before, and from a first look, nothing seems to be broken. Except in Statistics, when to generate custom reports. The page starts to load and stumbles there, throwing the error:

Invalid metric type., referer: pathto/management/tools/reportGenerator

The plugins folders and configurations look ok. Is something missing that i didn’t notice?

Thank you again for the help and patience.
Best regards

As a note, I can confirm that in early 3.x releases, the admin user is not explicitly also a journal manger. See:

Hello @ctgraham,

thank you for the note! It was indeed one of the causes of all this trouble in upgrading, mainly because it was in inactive “hidden” journals. Once it was fixed, no more issues with it.

Best regards

Hi @digitojs

You should enable the generic plugin “UsageStatistics” for that report to work… – we have to improve that error message…

Best,
Bozana

Hello @bozana,

You were right, I had to enable it again. It is working and displaying the graphs, but oddly - or not - it doesn’t present statistics for some older journals. We’ll see how it goes.

Thank you for your help.
Best regards

@digitojs

OK. It seems like the things are going forward… :slight_smile:

Best,
Bozana