Call to a member function getDecision() on null error in OJS 3.5 submission workflow

Describe the issue or problem

When attempting to view or manage certain submissions in OJS 3.5, a fatal error fails to load the editorial workflow. The error message is:

text

Call to a member function getDecision() on null

Instead of displaying the expected submission details or editorial interface, the error popup appears and the workflow cannot proceed.


Steps I took leading up to the issue

  1. Go to the OJS dashboard.

  2. Locate submission (IDs 500–505, and 510).

  3. Click on the submission to open its details/workflow.

  4. Encounter the error popup as soon as the workflow tries to load.


What application are you using?

  • OJS 3.5

Additional information

  • Expected behavior: Submission workflow and editorial decision details should display as normal.

  • Actual behavior: Error popup:
    Call to a member function getDecision() on null

  • This typically occurs when the database has missing, deleted, or NULL review_round_id values in edit_decisions or when the expected review round linkage is broken.

  • Troubleshooting: Attempts to verify edit_decisions and review_rounds linkage in the database showed entries with NULL review_round_id.

  • No relevant workflow data appears in the UI for affected submissions.

Screenshot:

When Opening Article from the Issue

Other Error

Best Regards,

Darryl Nuyda

Hi @everyoneeveryone;

Problem Recap:
When accessing some submission workflows in OJS 3.5, a fatal error occurs:
Call to a member function getDecision() on null.
This is usually triggered when the system tries to access $reviewRound->getDecision() but the $reviewRound object is actually null, often due to missing or broken review_round_id linkage in the database.

Solution:
To resolve this, edit the OJS file responsible for mapping submission decisions (typically:
lib/pkp/classes/submission/maps/Schema.php).
Locate any lines where you access methods like $reviewRound->getDecision().

For example, code like:

php

$decision = $reviewRound->getDecision();

Should be changed to:

php

if($reviewRound !== null) { $decision = $reviewRound->getDecision(); // Continue with further workflow logic}else{ $decision = null;// Or handle missing review round gracefully}

Additional Fix:
Wherever you have object chains like $decisionType = Repo::decision()->getDecisionType($decision->getData('decision'));
Add a check:

php

if($decisionType === null) { continue; } if(!Repo::decision()->isRecommendation($decisionType->getDecision())) { continue; }

This ensures the code does not attempt to call methods on a null object, regardless of incomplete or missing database entries.

Why This Works:
This prevents fatal errors in the dashboard/editorial UI when submissions or review rounds are missing, allowing OJS to fail gracefully and skip over broken data instead of crashing.

Note:
You may need to search for all places in your workflow code where $reviewRound methods are called and apply similar null checks to ensure completeness.

After updating, clear your OJS cache to ensure the fix is recognized.

Best Regards,

Darryl

3 Likes

This topic was automatically closed after 10 days. New replies are no longer allowed.