[solved] OJS upgrade OJS 3.1.2 to OJS 3.1.2.1, submission page HTTP error 500

I have recently upgraded my website www.ephjournal.com from OJS 3.1.2 to OJS 3.1.2.1
Everything works fine except loading of submission tab shows error 500.
What should I do to rectify the issue?
Regards

Error Log details are:
[28-Jun-2019 03:57:37 UTC] PHP Fatal error: Uncaught Error: Call to a member function getFullName() on null in /home/zgz1shl6ysu9/public_html/ojs3121/lib/pkp/classes/submission/reviewAssignment/ReviewAssignmentDAO.inc.php:480
Stack trace:
#0 /home/zgz1shl6ysu9/public_html/ojs3121/lib/pkp/classes/submission/reviewAssignment/ReviewAssignmentDAO.inc.php(69): ReviewAssignmentDAO->_fromRow(Array)
#1 /home/zgz1shl6ysu9/public_html/ojs3121/lib/pkp/classes/submission/reviewAssignment/ReviewAssignmentDAO.inc.php(217): ReviewAssignmentDAO->_getReviewAssignmentsArray(‘SELECT r.*, r2…’, Array)
#2 /home/zgz1shl6ysu9/public_html/ojs3121/lib/pkp/classes/services/PKPSubmissionService.inc.php(308): ReviewAssignmentDAO->getBySubmissionId(‘1465’)
#3 /home/zgz1shl6ysu9/public_html/ojs3121/lib/pkp/classes/services/PKPSubmissionService.inc.php(341): PKP\Services\PKPSubmissionService->getReviewAssignments(Object(Article))
#4 /home/zgz1shl6ysu9/public_html/ojs3121/lib/pkp/classes/services/PKPSubmissionService.inc.php(601): PKP\Services\PKPSubmissionService->canUserViewAuth in /home/zgz1shl6ysu9/public_html/ojs3121/lib/pkp/classes/submission/reviewAssignment/ReviewAssignmentDAO.inc.php on line 480

I have problems after upgrade too, but my error log says:
[29-Jun-2019 11:23:08 UTC] PHP Fatal error: Call to undefined method AddThisPlugin::getTemplateResourceName() in /home1/philscie/public_html/wisdomperiodical/plugins/generic/addThis/AddThisPlugin.inc.php on line 81

Try disabling the add this plugin.

Hi @ashotgev,

Your AddThis plugin is probably not compatible with your OJS. Make sure when you upgrade that the plugins you’re using are compatible with your version of OJS. (The best place to get compatible versions of your plugins is using the Plugin Gallery within OJS.)

Regards,
Alec Smecher
Public Knowledge Project Team

He @asmecher

Have you any suggestions for my query?

Regards
Naveen Malik

Hi @navmalik,

For your question:

 [28-Jun-2019 03:57:37 UTC] PHP Fatal error: Uncaught Error: Call to a member function getFullName() on null in /home/zgz1shl6ysu9/public_html/ojs3121/lib/pkp/classes/submission/reviewAssignment/ReviewAssignmentDAO.inc.php:480

You probably have a data error, where a review assignment refers to a non-existent reviewer. You can identify these by running the following query in your database:

SELECT r.* FROM review_assignments r LEFT JOIN users u ON (r.reviewer_id = u.user_id) WHERE u.user_id IS NULL;

These entries can probably be deleted (but take a backup before you do so, just to be safe). I’m not sure where these entries could be coming from, so if you’re able to shed any light on that, please do.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

The query shows a list of 527 results.
Now how can I delete these results?

Regards

@asmecher
I was not able to delete the query result, as there was no primary key.
But I have deleted all entries in review_assignment table and now it works fine.

Thank you for support

Hi @navmalik,

That will delete all peer reviews! Are you sure that’s what you want?

Regards,
Alec Smecher
Public Knowledge Project Team

Tx [asmecher] I have turne it off.

Hi @asmecher

I have taken backup of reviews, so it was fine to delete all peer reviews.

Again thank you for your support.

Regards
Naveen Malik
Editor
www.ephjournal.com

Hi @asmecher

Thanks to your post I was able to solve a similar problem I had trying to upgrade
from OJS 2.4.8-3 to OJS 3.2.0-3

Here is what my situation was:

PHP version: 7.3
OS: Linux Centos

Upgrade scipt executed via command line:

php tools/upgrade.php upgrade

Upgrade process got interrupted at a certain point with non error message.
Here is the command line standard out:

[pre-install]
[load: upgrade.xml]
[version: 3.2.0.3]

[code: Installer Installer::checkPhpVersion]

[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 (skipped)]

[code: Installer Installer::removeReviewEntries]
[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)]
[data: dbscripts/xml/upgrade/3.0.0_preupdate_commentsToEditor.xml]
[data: dbscripts/xml/upgrade/3.1.0_preupdate_review_assignments.xml]
[data: dbscripts/xml/upgrade/3.1.0_preupdate_notes.xml]
[data: dbscripts/xml/upgrade/3.1.0_preupdate_payments.xml]
[data: dbscripts/xml/upgrade/3.1.1_preupdate_citations.xml]
[data: dbscripts/xml/upgrade/3.1.2_preupdate_user_author_names.xml]

[code: Installer Installer::migrateSubmissionCoverImages]
[data: dbscripts/xml/upgrade/3.2.0_preupdate_email_templates.xml]
[data: dbscripts/xml/upgrade/3.2.0_preupdate_versioning_articleGalleySettings.xml]
[data: dbscripts/xml/upgrade/3.2.0_preupdate_versioning.xml]
[data: dbscripts/xml/upgrade/3.2.0_preupdate_last_activity.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]
[schema: lib/pkp/xml/schema/categories.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/genres.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: lib/pkp/xml/schema/navigationMenus.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[data: dbscripts/xml/indexes.xml]

[code: Installer Installer::installDefaultNavigationMenus]

[code: Installer Installer::migrateStaticPagesToNavigationMenuItems]

[code: Installer Installer::migrateSRLocale]

[code: Installer Installer::migrateUserAndAuthorNames]

[code: Installer Installer::concatenateIntoAbout]

[code: Installer Installer::concatenateIntoMasthead]

[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 (skipped)]
[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_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::installDefaultGenres]

[code: Installer Installer::migrateArticleMetadata]
[data: dbscripts/xml/upgrade/3.0.0_update.xml]

[code: Installer Installer::clearDataCache]

[code: Installer Installer::migrateUserRoles]

[code: Installer Installer::fixReviewForms]

[code: Installer Installer::htmlifyEmailTemplates]
[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]

[code: Installer Installer::convertEditorDecisionNotes]

[code: Installer Installer::convertQueries]

[code: Installer Installer::migrateFiles]

[code: Installer Installer::convertSupplementaryFiles]

[code: Installer Installer::provideSupplementaryFilesForReview]

In the php_error_log there was this error:

[11-Jun-2020 11:39:30 UTC] PHP Fatal error: Uncaught Error: Call to a member function getFullName() on null in /var/www/vhosts/my.site.doc.root/lib/pkp/classes/submission/reviewAssignment/ReviewAssignmentDAO.inc.php:485

I was able to solve the problem using the query suggested by @asmecher on the DB of OJS v 2.4.8 (before upgrade):

SELECT r.* FROM review_assignments r LEFT JOIN users u ON (r.reviewer_id = u.user_id) WHERE u.user_id IS NULL;

The query gave me some rows of review assignments referring to non-existent reviewers.

I checked tables users and review_assignments to be sure that the problem was a non-existing reviewers.

Then i deleted those rows from the table review_assignments.

I Re-ran the upgrade script on the modified DB and the script completed with a success message:

Successfully upgraded to version 3.2.0.3

2 Likes