Hi All,
I’m getting an unexpected error on my published panel. Has anyone else experienced something similar?
OMP 3.5.0.1
Error: Call to a member function getDecision() on null in \lib\pkp\classes\submission\maps\Schema.php:957
Regards,
Hi,
In /lib/pkp/classes/submission/maps/Schema.php:957 Changing this worked for me..
// Retrieve recommendations for the review stage $reviewRecommendations = collect(); if ( isset($currentReviewRound) && isset($decisions) && $decisions->isNotEmpty() ) { foreach ($decisions as $decision) { // Get only recommendation decisions $decisionType = Repo::decision()->getDecisionType($decision->getData(‘decision’)); if (!Repo::decision()->isRecommendation($decisionType->getDecision())) { continue; } // Get only decisions related to the relevant review round if ($currentReviewRound->getId() != $decision->getData(‘reviewRoundId’)) { continue; } $reviewRecommendations->push($decision); } }
por
// Retrieve recommendations for the review stage
$reviewRecommendations = collect();
if (
isset($currentReviewRound) &&
isset($decisions) && $decisions->isNotEmpty()
) {
foreach ($decisions as $decision) {
// Asegurarse de que $decision no es null
if ($decision === null) {
continue;
}
// Get only recommendation decisions
$decisionData = $decision->getData('decision');
if ($decisionData === null) {
continue;
}
$decisionType = Repo::decision()->getDecisionType($decisionData);
// Proteger contra getDecision() sobre null
if ($decisionType === null || !Repo::decision()->isRecommendation($decisionType->getDecision())) {
continue;
}
// Get only decisions related to the relevant review round
if ($currentReviewRound->getId() != $decision->getData('reviewRoundId')) {
continue;
}
$reviewRecommendations->push($decision);
}
}
Regards,
Hi @desarrollo_escire !
FYI, this workaround isn’t enough to address the problem properly. See related issues in GitHub, I just can say the solution is kind of ready, just waiting to be approved/merged:
opened 09:18AM - 16 Dec 25 UTC
Housekeeping:2:Urgent
**Description:**
Original Issue at https://github.com/pkp/pkp-lib/issues/11241
I… mpacts for 3.4 installation discussed at https://github.com/pkp/pkp-lib/issues/11241#issuecomment-3604024243
**Solution:** What the proposed solutions are and additional affected areas
1. fixed the migration where this issue introduced for 3.3 to 3.4 upgrade similar to 3.5/main upgrade
2. introduce a new migration for 3.4.0-x to 3.4.0-y where the solution will be applied for 3.4.0-y upgrade
3. update 3.5 and main branch migration where the solution has been introduced to have a check if upgrading from 3.4.0-y or above, not to run the fix migration there again
**What application are you using?**
OJS, OMP or OPS version 3.4.0
### Fix Includes
https://github.com/pkp/pkp-lib/issues/11876
https://github.com/pkp/pkp-lib/issues/12357
### PRs
#### Stable-3.4.0
[ojs](https://github.com/pkp/ojs) --> https://github.com/pkp/ojs/pull/5246
[omp](https://github.com/pkp/omp) --> https://github.com/pkp/omp/pull/2275
[ops](https://github.com/pkp/ops) --> https://github.com/pkp/ops/pull/1242
#### Stable-3.5.0
[pkp-lib](https://github.com/pkp/pkp-lib) --> https://github.com/pkp/pkp-lib/pull/12457
[ojs](https://github.com/pkp/ojs) --> https://github.com/pkp/ojs/pull/5247
[omp](https://github.com/pkp/omp) --> https://github.com/pkp/omp/pull/2274
[ops](https://github.com/pkp/ops) --> https://github.com/pkp/ops/pull/1241
#### main
opened 04:51PM - 26 Sep 25 UTC
Community:2:Priority
Enhancement:1:Minor
**Description:**
There seems to be quite a few issues around getDecision() membe… r function call throwing an error on the submission list. A community member may have found a more generalized solution to the problem. Please investigate if this fix is worth the risk of introducing a core change. Here is another instance of the problem #11721
> A similar getDecision() issue was called out during release. I think first discovered here : https://github.com/pkp/pkp-lib/issues/7725
> A fix was then implemented here: https://github.com/pkp/pkp-lib/issues/11241
> I would express extreme caution at applying a fix at this level as this getDecision() error keeps cropping up in unknown places.
I'm not exactly sure how to test it directly on the front end so this will have to be tested as part of a regression testing. However, prior to merging some migration validation is in order with more robust datasets.
I have it listed under 3.5 issues during upgrade testing.
**Steps to test the changes:**
These steps can include user interactions, database queries and API requests
1. Perform upgrade validation with multiple datasets.
2. Observe the Activity Log in multiple submissions and validate they are working correctly for editorial decision logs.
**Should look like this**
<img width="745" height="40" alt="Image" src="https://github.com/user-attachments/assets/88005bae-6071-42bd-9a2e-0625e656530c" />
**Should not look like this**
<img width="1314" height="42" alt="Image" src="https://github.com/user-attachments/assets/c34014ae-2300-4c9a-a116-677f0c0b0ed2" />
**or This**
<img width="1186" height="42" alt="Image" src="https://github.com/user-attachments/assets/f889f731-4dbc-4922-adc2-a3fd1214bebf" />
**Solution:** What the proposed solutions are and additional affected areas
Given by the community member in the pkp forum : https://forum.pkp.sfu.ca/t/call-to-a-member-function-getdecision-on-null-error-in-ojs-3-5-submission-workflow/97112/4
**What application are you using?**
OJS 3.5.0
**Additional information**
Please add any screenshots, videos or other information we can use to understand this dev task report.
opened 03:51PM - 17 Feb 26 UTC
### Valid Title
- [x] I have updated the title to accurately reflect the bug de… scription
### Description
After an upgrade from OJS 3.3 to 3.5 trying to access _**one specifc article**_ from the editor dashboard results in "Call to a member function getDecision() on null" error message.
<img width="1480" height="750" alt="Image" src="https://github.com/user-attachments/assets/1573dc16-2933-444c-acfb-417d5779ff99" />
Accessing this article in OJS 3.3 works fine.
Originally I recognized this when using `Repo::submission()->getSchemaMap()->mapManyToSubmissionsList` from my DNB Export Plugin, an execption was raised.
The origin of the exception seems either to be corrupted data in the database (gracefully handled by OJS 3.3) or a migration issue.
### Steps to Reproduce
Not sure whether or not this is reproducible without the particular data. Depends on whether its an issue of a corrupted database or a migration issue.
### Expected Result
Handle the exception and provide the data that is available. This would be the bug-part of the issue.
### Actual Result
See above. Please also note, that (dependig on the number on entries/search settings) the pagination of the submission list fails due to this error. I get an empty table for the page that contains this sepcific article, i.e. I cannot access articles on the same table page either.
### Environment Details
_No response_
### Application Version
OJS 3.5.0-3
### Logs
[Tue Feb 17 09:08:24.104136 2026] [php:notice] [pid 19:tid 19] [client 127.0.0.1:39066] Error: Call to a member function getDecision() on null in /var/www/html/ojs/lib/pkp/classes/submission/maps/Schema.php:960
### Additional Information
One issue is, that `public function getDecisionType(int $decision)` in Repository.php may return NULL if no decission was found, and this case is not handled in line 960 of Schema.php.
The other may or may not be a migration issue. The original database entry in OJS 3.3 is:
```pre
MariaDB [ojs_zgd]> select * from edit_decisions where submission_id = 9;
+------------------+---------------+-----------------+----------+-------+-----------+----------+---------------------+
| edit_decision_id | submission_id | review_round_id | stage_id | round | editor_id | decision | date_decided |
+------------------+---------------+-----------------+----------+-------+-----------+----------+---------------------+
| 12 | 9 | 0 | 1 | 0 | 1 | 8 | 2019-06-03 11:02:35 |
| 13 | 9 | 5 | 3 | 1 | 1 | 1 | 2019-06-03 11:02:46 |
| 14 | 9 | 0 | 4 | 0 | 1 | 7 | 2019-06-03 11:28:15 |
| 36 | 9 | 0 | 5 | 0 | 1 | 1 | 2019-12-20 16:44:46 |
| 37 | 9 | 0 | 4 | 0 | 1 | 7 | 2019-12-20 16:45:01 |
+------------------+---------------+-----------------+----------+-------+-----------+----------+---------------------+
```
and after the upgrade to OJS 3.5 it looks like this:
```pre
MariaDB [ojs]> select * from edit_decisions where submission_id = 9;
+------------------+---------------+-----------------+----------+-------+-----------+----------+---------------------+
| edit_decision_id | submission_id | review_round_id | stage_id | round | editor_id | decision | date_decided |
+------------------+---------------+-----------------+----------+-------+-----------+----------+---------------------+
| 12 | 9 | NULL | 1 | NULL | 1 | 3 | 2019-06-03 11:02:35 |
| 13 | 9 | 5 | 3 | 1 | 1 | 2 | 2019-06-03 11:02:46 |
| 14 | 9 | NULL | 4 | NULL | 1 | 7 | 2019-06-03 11:28:15 |
| 36 | 9 | NULL | 5 | NULL | 1 | 1 | 2019-12-20 16:44:46 |
| 37 | 9 | NULL | 4 | NULL | 1 | 7 | 2019-12-20 16:45:01 |
+------------------+---------------+-----------------+----------+-------+-----------+----------+---------------------+
```
The exception is raised by decision = 1, i.e. edit_decision_id = 36. Please notice, that there is another decision = 1 in the original entry which, after migration, is set to 2. Not sure whether the failing entry should also have been migrated to another value, or whether the original data is corrupted.
Any hint on whether this is corrupted data, that I have to fix before my production upgrade (and how to fix it), would be very welcome.
Best,
Jonas Raoni