Record Decision Error: An unexpected error has occurred

Continuing the discussion from Record Decision Error: An unexpected error has occurred. Please reload the page and try again:

We are encountering the same error after upgrading from OJS 3.3.0.20 to OJS 3.4.0.10. I was wondering @denz_Ravenzle if you were able to find a solution, or if you ended up upgrading to 3.5 as per Alec’s recommendation.

Many thanks,
Gabriela

Hi @gabriela1,

Can you check your PHP error log to see if you’re encountering the same error message there? It’s possible that the cause is different than the other thread, even though the user interface shows the same message.

Regards,
Alec Smecher
Public Knowledge Project Team

Certainly! You are correct. The error log shows a different message.

[14-Jan-2026 13:58:04 America/Edmonton] Slim Application Error:

Type: TypeError

Message: APP\issue\Repository::get(): Argument #1 ($id) must be of type int, null given, called in /ojs-3.4.0-10-folder/classes/doi/Repository.php on line 67

File: /ojs-3.4.0-10-folder/classes/issue/Repository.php

Line: 71

Trace: #0 /ojs-3.4.0-10-folder/classes/doi/Repository.php(67): APP\issue\Repository->get(NULL)

#1 /ojs-3.4.0-10-folder/classes/submission/Repository.php(153): APP\doi\Repository->mintPublicationDoi(Object(APP\publication\Publication), Object(APP\submission\Submission), Object(APP\journal\Journal))

#2 /ojs-3.4.0-10-folder/lib/pkp/classes/observers/listeners/AssignDOIs.php(52): APP\submission\Repository->createDois(Object(APP\submission\Submission))

#3 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(441): PKP\observers\listeners\AssignDOIs->handle(Object(PKP\observers\events\DecisionAdded))

#4 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(249): Illuminate\Events\Dispatcher->Illuminate\Events{closure}(‘PKP\observers\e…’, Array)

#5 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(451): Illuminate\Events\Dispatcher->dispatch(‘PKP\observers\e…’)

#6 /ojs-3.4.0-10-folder/lib/pkp/classes/decision/Repository.php(251): event(Object(PKP\observers\events\DecisionAdded))

#7 /ojs-3.4.0-10-folder/lib/pkp/api/v1/submissions/PKPSubmissionHandler.php(1634): PKP\decision\Repository->add(Object(APP\decision\Decision))

#8 [internal function]: PKP\API\v1\submissions\PKPSubmissionHandler->addDecision(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Array)

#9 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Array, Object(Slim\Http\Request), Object(PKP\core\APIResponse), Array)

#10 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(PKP\core\APIResponse), Array)

#11 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#12 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#13 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#14 /ojs-3.4.0-10-folder/lib/pkp/classes/security/authorization/internal/ApiAuthorizationMiddleware.php(90): Slim\App->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#15 [internal function]: PKP\security\authorization\internal\ApiAuthorizationMiddleware->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Slim\App))

#16 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(PKP\security\authorization\internal\ApiAuthorizationMiddleware), Array)

#17 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Slim\App))

#18 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Slim\App))

#19 /ojs-3.4.0-10-folder/lib/pkp/classes/security/authorization/internal/ApiCsrfMiddleware.php(56): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#20 [internal function]: PKP\security\authorization\internal\ApiCsrfMiddleware->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#21 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(PKP\security\authorization\internal\ApiCsrfMiddleware), Array)

#22 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#23 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#24 /ojs-3.4.0-10-folder/lib/pkp/classes/security/authorization/internal/ApiTokenDecodingMiddleware.php(140): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#25 [internal function]: PKP\security\authorization\internal\ApiTokenDecodingMiddleware->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#26 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(PKP\security\authorization\internal\ApiTokenDecodingMiddleware), Array)

#27 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#28 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#29 /ojs-3.4.0-10-folder/lib/pkp/classes/handler/APIHandler.php(83): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#30 [internal function]: PKP\handler\APIHandler->PKP\handler{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#31 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)

#32 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#33 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#34 /ojs-3.4.0-10-folder/lib/pkp/classes/handler/APIHandler.php(100): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#35 [internal function]: PKP\handler\APIHandler->PKP\handler{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#36 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)

#37 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#38 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#39 /ojs-3.4.0-10-folder/lib/pkp/classes/handler/APIHandler.php(105): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#40 [internal function]: PKP\handler\APIHandler->PKP\handler{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#41 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)

#42 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#43 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#44 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#45 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#46 /ojs-3.4.0-10-folder/lib/pkp/classes/handler/APIHandler.php(98): Slim\App->process(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#47 [internal function]: PKP\handler\APIHandler->PKP\handler{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#48 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)

#49 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#50 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#51 /ojs-3.4.0-10-folder/lib/pkp/classes/handler/APIHandler.php(105): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#52 [internal function]: PKP\handler\APIHandler->PKP\handler{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#53 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)

#54 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#55 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(PKP\core\APIResponse), Object(Closure))

#56 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#57 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#58 /ojs-3.4.0-10-folder/lib/pkp/lib/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(PKP\core\APIResponse))

#59 /ojs-3.4.0-10-folder/lib/pkp/classes/core/APIRouter.php(110): Slim\App->run()

#60 /ojs-3.4.0-10-folder/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\APIRouter->route(Object(APP\core\Request))

#61 /ojs-3.4.0-10-folder/lib/pkp/classes/core/PKPApplication.php(395): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))

#62 /ojs-3.4.0-10-folder/index.php(21): PKP\core\PKPApplication->execute()

#63 {main}

View in rendered output by enabling the “displayErrorDetails” setting.

Best wishes,
Gabriela

Hi @gabriela1,

I think this is caused by publications that are designated against non-existent issues. Check the results for the following SQL query:

SELECT ps.*
FROM publication_settings ps
LEFT JOIN issues i ON (ps.setting_value = i.issue_id)
WHERE
    ps.setting_name='issueId'
    AND i.issue_id IS NULL;

It should be empty, but I suspect you’ll see some results.

Regards,
Alec Smecher
Public Knowledge Project Team

The SQL query above returned 0 records.

This was happening for new submissions, either when we used Accept and Skip Review or after the review was complete and we were trying to record the decision to accept the submission. Our developer investigated and noted that if we set Automatic DOI Assignment to Upon publication, rather than Upon reaching the copyediting stage, the error disappears.

We can live with this setting for the purposes of completing the upgrade. To test the upgrade, we cloned the production site to a development server and removed all DOI settings so that we do not mint new DOIs or update existing ones while testing. This approach is most likely part of the problem.

Many thanks for your prompt assistance.

Best wishes,
Gabriela

Hi @gabriela1,

We just upgraded to 3.4.0-10 and our editors reported the same error when trying to record a decision (accept the submission after review). I found the same error in apache´s error_log.

As your team noticed, when setting Automatic DOI Assignment to Upon publication, instead of Upon reaching the copyediting stage, the recording decision runs smoothly.

So I investigated this problem in our sandbox environment. And this is what I found:

If Automatic DOI Assignment is set to Upon reaching the copyediting stage and your journal is using a custom DOI sufix with one of this symbols (%v Issue Volume, %i Issue Number
or %Y Issue Year), trying to move to copyediting a submission that don´t have a issue assigned, causes this error.

So I tested some cenarios to confirm this assumption:

Automatic DOI Assignment set to Upon reaching the copyediting stage + custom DOI suffix (%j.%Y.%v.%a) + submission without issue assigned = Error, but after refreshing the page, submission was moved to copyediting stage. No DOI was assigned.

Automatic DOI Assignment set to Upon reaching the copyediting stage + default DOI suffix + submission without issue assigned = submission moved to copyediting stage with no errors. DOI assigned.

Automatic DOI Assignment set to Upon reaching the copyediting stage + custom DOI suffix (%j.%Y.%v.%a) + submission with issue assigned = submission moved to copyediting stage with no errors. DOI assigned.

So, @asmecher can you confirm that´s the root cause for the error? If so, instead of showing this generic error, OJS could alert the editor that no DOI is going to be assigned because no issue is assigned and that the editor should assign the DOI manually later. I think this alert message is necessary because after refreshing the page, you can see that the submission was moved successfully to copyediting stage and email was sent to author and reviewers (even after OJS saying that an unexpected error occurred).

I can confirm that I have replicated the scenarios above on our dev server and the ojs34.testdrive with I get the same results.

Many thanks,
Gabriela

Thanks @gabriela1 and @lucas08,

I’ve created an issue in Github to track this work. The fix will be coming to the branches on Github shortly and progress on it can be followed there.

Best,

Erik
PKP Team