Upgrade OJS 2.4.8 to OJS 3

  1. I have tried upgrade 2.4.8 to 3.0.0 in my local system (wamp server)
    I got blank page under link “http://localhost/journals/index.php/index/install/installUpgrade”.

After i have changed installed = On in config.inc.php and styles are not loaded and after i saw view source in index file.
Stiles file and script files are not included.

Can you please help for upgrade process

Hi @sathyarajo

Could you provide some more information, e.g. how did you do the upgrade, what errors occurred, what steps did you do, etc.? You also probably mean 3.0.2, right?

Best,
Bozana

I am using command “php tools/upgrade.php upgrade” and tried OJS 3.0.2.
I have got following error.
root@ojs:/var/www/html/journals# php tools/upgrade.php upgrade
[pre-install]
[load: upgrade.xml]
[version: 3.0.2.0]

[code: Installer Installer::syncSeriesAssocType]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics2.xml]
[data: dbscripts/xml/upgrade/3.0.0_preupdate.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptTimedViews.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_adaptReferrals.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptBooksForReview.xml]
[data: dbscripts/xml/upgrade/remove_timed_views_bots.xml (skipped)]

[code: Installer Installer::migrateCounterPluginUsageStatistics (skipped)]

[code: Installer Installer::migrateTimedViewsUsageStatistics (skipped)]

[code: Installer Installer::migrateDefaultUsageStatistics (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postUsageStatsMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postUsageStatsMigration2.xml]
[data: dbscripts/xml/upgrade/2.4.0_postCounterMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postTimedViewsMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_preupdate_commentsToEditor.xml]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/submissionFiles.xml]
". Skipping this file.
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/genres.xml]
[schema: lib/pkp/xml/schema/gifts.xml]
[schema: lib/pkp/xml/schema/mutex.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/rolesAndUserGroups.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/libraryFiles.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[data: dbscripts/xml/indexes.xml]
[data: dbscripts/xml/upgrade/3.0.0_change_assoc_type.xml]
[data: dbscripts/xml/upgrade/3.0.0_change_assoc_type_metrics.xml]
[data: dbscripts/xml/upgrade/3.0.0_settings.xml]

[code: Installer Installer::migrateArticleMetadata]
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
[data: dbscripts/xml/upgrade/3.0.0_update.xml]

[code: Installer Installer::clearDataCache]

[code: Installer Installer::migrateUserRoles]
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133

[code: Installer Installer::installDefaultGenres]

[code: Installer Installer::fixReviewForms]

[code: Installer Installer::htmlifyEmailTemplates]
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
[note: docs/release-notes/README-BEACON]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]
[data: dbscripts/xml/upgrade/3.0.0_scheduledTasks.xml]

[code: Installer Installer::localizeCustomBlockSettings]
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133

[code: Installer Installer::convertEditorDecisionNotes]

[code: Installer Installer::convertQueries]

[code: Installer Installer::migrateFiles]
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
WARNING: Unable to find a match for “397-1186-1-SM.doc” in “/var/www/html/journals/files/journals/73//articles/397/”. Skipping this file.
WARNING: Unable to find a match for “397-1188-1-RV.doc” in “/var/www/html/journals/files/journals/73//articles/397/”. Skipping this file.
WARNING: Unable to find a match for “397-1187-1-SP.doc” in “/var/www/html/journals/files/journals/73//articles/397/”. Skipping this file.
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
WARNING: Unable to find a match for “369-1178-1-RV.pdf” in “/var/www/html/journals/files/journals/72//articles/369/”. Skipping this file.
WARNING: Unable to find a match for “395-1179-1-SM.docx” in “/var/www/html/journals/files/journals/72//articles/395/”. Skipping this file.
WARNING: Unable to find a match for “395-1180-1-RV.docx” in “/var/www/html/journals/files/journals/72//articles/395/”. Skipping this file.
WARNING: Unable to find a match for “377-1112-1-SM.docx” in “/var/www/html/journals/files/journals/14//articles/377/”. Skipping this file.
WARNING: Unable to find a match for “377-1113-1-RV.docx” in “/var/www/html/journals/files/journals/14//articles/377/”. Skipping this file.
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /var/www/html/journals/lib/pkp/classes/core/DataObject.inc.php on line 133
WARNING: Unable to find a match for “155-69-2-SP.jpg” in “/var/www/html/journals/files/journals/10//articles/155/”. Skipping this file.

[code: Installer Installer::convertSupplementaryFiles]
PHP Warning: copy(/var/www/html/journals/files/journals/1//articles/50/attachment/50-1-210-1-13-20150304.pdf): failed to open stream: No such file or directory in /var/www/html/journals/lib/pkp/classes/file/FileManager.inc.php on line 159
PHP Warning: assert(): Assertion failed in /var/www/html/journals/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 132
PHP Warning: assert(): Assertion failed in /var/www/html/journals/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 355
PHP Fatal error: Call to a member function getFilePath() on null in /var/www/html/journals/lib/pkp/classes/submiss
ion/PKPSubmissionFileDAO.inc.php on line 377

Can you please help me.

Hi @sathyarajo

Phew… There seem to be several problems: like some DB entries are not localized, although they should be, like some files are missing,…
A note: please backup EVERYTHING from 2.4.8 and always restore that full backup before a new upgrade try (always use the original/backuped 2.4.8 DB and files)!!!
Could you maybe double check all the missing files in your original i.e. 2.4.8 installation – what files they are, why they are missing (they are in the DB, but not in the files_dir), check them in the UI and … then finally either delete them from the UI or restore them in the files_dir ?
Also double check that all your journals have a journal manager – it is not enough that there is admin, but a ‘real’ journal manager for each journal.
Finally, check that all your journals from the DB table journals are existing and active ones – that there is no journal in the DB that was actually deleted but it still remained in the DB.
If you want you could send me a private message with your anonymized DB dump (you should set all usernames, passwords, user first names, last names, e-mails, tel., mailing addresses, bio statements, etc. at a default value), and I would then test the upgrade locally i.e. try to figure out the other errors.

Best,
Bozana

Is it okay if each journal shares the same journal manager?

Can’t admin have multiple roles in OJS? For example, an admin can also be a journal manager. Is there any issue with this?

-Newone

Hi @newone

Yes, it is ok for each journal to have the same journal manager, but for the upgrade script it has to be explicitly a journal manager and not the admin with journal manager rights.
Admin can have multiple roles, but this is not considered in the current upgrade script (we will eventually change that), so if there is only admin and not another journal manager the upgrade script will fail.

Best,
Bozana

shall i send my db dump. can you check please?

Hi @sathyarajo, yes, please use the private messaging in this forum or e-mail bozana dot bokan at posteo dot net. Do not forget to anonymize the DB before sending it!!!

Can you please explain this functionality?

function setFileName() { /* */ } in classes/install/Upgrade.inc.php in line no: 970

Hi @sathyarajo

In OJS 3.x each file will have a localized metadata “name”, that is presented to the users throughout the system. This metadata did not exist in OJS 2.x – there the server file names something like “1-1-1-SM.pdf” were used/displayed to the users.
The new metadata “name” has the following form, for example:
author1, Author, ArticleLondon.docx
I.e. , , <original_file_name>.
Because the files in review have to be anonymized, the metadata “name” for those files would be, for example:
Author, ArticleLondon.docx
I.e. , <original_file_name>, i.e. without the username.

The function setFileName goes through all journals, through all articles, and constructs and sets their new metadata “name”. Those names are saved in the DB table submission_file_settings.

Best,
Bozana

My problem only while convert supplementary files.
Can you please help me?

Hi @sathyarajo

Could you explain more what is happening?
When I look at your post above, I see this:

[code: Installer Installer::convertSupplementaryFiles]
PHP Warning: copy(/var/www/html/journals/files/journals/1//articles/50/attachment/50-1-210-1-13-20150304.pdf): failed to open stream: No such file or directory in /var/www/html/journals/lib/pkp/classes/file/FileManager.inc.php on line 159
PHP Warning: assert(): Assertion failed in /var/www/html/journals/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 132
PHP Warning: assert(): Assertion failed in /var/www/html/journals/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 355
PHP Fatal error: Call to a member function getFilePath() on null in /var/www/html/journals/lib/pkp/classes/submiss
ion/PKPSubmissionFileDAO.inc.php on line 377

That would mean that that file is missing, so you would first have to fix that in your 2.4.8 installation – the file is in the DB but not in the files_dir, so you would either need to upload it correctly or delete it correctly (probably from the Web-UI).

Or do you now have a different problem?

Best,
Bozana

Hello Bozana,

Will the upgrade script break for submissions that are done by the admin? For example, if an admin is submitting on behalf of an author, will it break the upgrade script?

Does it matter if the admin is uploading back issues in OJS? Will it break the upgrade script?

That is, if the admin submits the paper either for the author or upload back issues, will the upgrade script break?

-Newone

Hi @newone

No, this should not break the upgrade script. Just that all journals have to have a ‘real’ Journal Manager i.e. an explicit user with that role and not only the admin user.

Best,
Bozana

HI
This also happened to me. I recommend you to double check your files folder path in the config.inc.php file. It was my case, a wrong path so… if this is your case it will surely fix the issue.