OJS 3.2.0.3 Slim error message on Dashboard submission page

I have a problem accessing the submission page. If anyone can help I would be very grateful.

Pop Up “An unexpected error occurred. Please reload the page and try again. If the error persists, contact technical support.”

PHP error follows:
[Wed Mar 30 00:54:54.276786 2022] [php7:notice] [pid 14686] [client 10.171.1.142:13725] Slim Application Error:\nType: Error\nMessage: Call to a member function getData() on null\nFile: /opt/ojs/lib/pkp/classes/submission/PKPSubmission.inc.php\nLine: 54\nTrace: #0 /opt/ojs/classes/services/PublicationService.inc.php(83): PKPSubmission->getBestId()\n#1 /opt/ojs/lib/pkp/classes/plugins/HookRegistry.inc.php(107): APP\Services\PublicationService->getPublicationProperties()\n#2 /opt/ojs/lib/pkp/classes/services/PKPPublicationService.inc.php(222): HookRegistry::call()\n#3 /opt/ojs/lib/pkp/classes/services/PKPPublicationService.inc.php(235): PKP\Services\PKPPublicationService->getProperties()\n#4 /opt/ojs/lib/pkp/classes/services/PKPSubmissionService.inc.php(204): PKP\Services\PKPPublicationService->getSummaryProperties()\n#5 [internal function]: PKP\Services\PKPSubmissionService->PKP\Services\{closure}()\n#6 /opt/ojs/lib/pkp/classes/services/PKPSubmissionService.inc.php(208): array_map()\n#7 /opt/ojs/lib/pkp/classes/services/PKPSubmissionService.inc.php(297): PKP\Services\PKPSubmissionService->getProperties()\n#8 /opt/ojs/lib/pkp/api/v1/_submissions/PKPBackendSubmissionsHandler.inc.php(158): PKP\Services\PKPSubmissionService->getBackendListProperties()\n#9 [internal function]: PKPBackendSubmissionsHandler->getMany()\n#10 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func()\n#11 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke()\n#12 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke()\n#13 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack()\n#14 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/App.php(503): Slim\Route->run()\n#15 /opt/ojs/lib/pkp/classes/security/authorization/internal/ApiAuthorizationMiddleware.inc.php(76): Slim\App->__invoke()\n#16 [internal function]: ApiAuthorizationMiddleware->__invoke()\n#17 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()\n#18 [internal function]: Slim\DeferredCallable->__invoke()\n#19 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()\n#20 /opt/ojs/lib/pkp/classes/security/authorization/internal/ApiCsrfMiddleware.inc.php(46): Slim\App->Slim\{closure}()\n#21 [internal function]: ApiCsrfMiddleware->__invoke()\n#22 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()\n#23 [internal function]: Slim\DeferredCallable->__invoke()\n#24 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()\n#25 /opt/ojs/lib/pkp/classes/security/authorization/internal/ApiTokenDecodingMiddleware.inc.php(82): Slim\App->Slim\{closure}()\n#26 [internal function]: ApiTokenDecodingMiddleware->__invoke()\n#27 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()\n#28 [internal function]: Slim\DeferredCallable->__invoke()\n#29 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()\n#30 /opt/ojs/lib/pkp/classes/handler/APIHandler.inc.php(68): Slim\App->Slim\{closure}()\n#31 [internal function]: APIHandler->{closure}()\n#32 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()\n#33 [internal function]: Slim\DeferredCallable->__invoke()\n#34 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()\n#35 /opt/ojs/lib/pkp/classes/handler/APIHandler.inc.php(127): Slim\App->Slim\{closure}()\n#36 [internal function]: APIHandler->{closure}()\n#37 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()\n#38 [internal function]: Slim\DeferredCallable->__invoke()\n#39 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()\n#40 /opt/ojs/lib/pkp/classes/handler/APIHandler.inc.php(132): Slim\App->Slim\{closure}()\n#41 [internal function]: APIHandler->{closure}()\n#42 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()\n#43 [internal function]: Slim\DeferredCallable->__invoke()\n#44 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()\n#45 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}()\n#46 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack()\n#47 /opt/ojs/lib/pkp/classes/handler/APIHandler.inc.php(124): Slim\App->process()\n#48 [internal function]: APIHandler->{closure}()\n#49 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()\n#50 [internal function]: Slim\DeferredCallable->__invoke()\n#51 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()\n#52 /opt/ojs/lib/pkp/classes/handler/APIHandler.inc.php(132): Slim\App->Slim\{closure}()\n#53 [internal function]: APIHandler->{closure}()\n#54 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()\n#55 [internal function]: Slim\DeferredCallable->__invoke()\n#56 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()\n#57 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}()\n#58 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack()\n#59 /opt/ojs/lib/pkp/lib/vendor/slim/slim/Slim/App.php(297): Slim\App->process()\n#60 /opt/ojs/lib/pkp/classes/core/APIRouter.inc.php(115): Slim\App->run()\n#61 /opt/ojs/lib/pkp/classes/core/Dispatcher.inc.php(143): APIRouter->route()\n#62 /opt/ojs/lib/pkp/classes/core/PKPApplication.inc.php(278): Dispatcher->dispatch()\n#63 /opt/ojs/index.php(68): PKPApplication->execute()\n#64 {main}\nView in rendered output by enabling the “displayErrorDetails” setting.\n, referer: https://www.revista.esap.go.gov.br/index.php/resap/submissions

Versão Atual: 3.2.0.3 (June 18, 2020 - 12:40 AM)

Versão do Apache Apache/2.4.41 (Ubuntu)
Versão do servidor de base de dados PostgreSQL 13.6 (Ubuntu 13.6-1.pgdg20.04+1)

i18n
locale pt_BR
client_charset utf-8
connection_charset utf8
database_charset utf8
charset_normalization Desativado

PHP Version 7.4.3

Hi @Felipe_Bruno

This error is a result of a submission in your database not having a publication object to go with it. Have you recently upgraded or perhaps used the quick submit plugin?

You’ll need to identify the submission in the database missing the publication record and remove it.

Best
Jason

@jnugent I appreciate your help. I didn’t update and I don’t use fast shipping plugin, this error just appeared for no reason that I can identify. I’m a layman can you tell me how to identify and solve the problem?

I made this query and a count 2 appears

SELECT COUNT(*) FROM submissions s LEFT JOIN publications p ON (s.current_publication_id = p.publication_id) WHERE p.publication_id IS NULL;

Hi @Felipe_Bruno

If you run that query with just “SELECT * …” you’ll get the submission ids of the two records. Can you load either of them in the workflow?

Best
Jason

1 Like

@jnugent When identifying these records what should I do? Should I remove?

Hi @Felipe_Bruno

Yes, if they will not load at all in OJS you can remove them with the command line tool that comes with ojs:

php tools/deleteSubmissions.php 1 2 3 4 5 ....

where the numbers are the ids of the submissions.

Best
Jason

@jnugent thank you very much. I did the procedures and it worked very well.

SELECT * FROM submissions s LEFT JOIN publications p ON (s.current_publication_id = p.publication_id) WHERE p.publication_id IS NULL;

 submission_id | locale | context_id | section_id | date_submitted |    last_modified    | status | submission_progress | stage_id | current_publication_id | date_last_activity  | publication_id | access_status | date_published | last_modified | locale | primary_contact_id | section_id | seq | submission_id | status | url_path | version
---------------+--------+------------+------------+----------------+---------------------+--------+---------------------+----------+------------------------+---------------------+----------------+---------------+----------------+---------------+--------+--------------------+------------+-----+---------------+--------+----------+---------
           461 |        |          1 |            |                | 2022-03-29 11:22:28 |      1 |                   2 |        1 |                        | 2022-03-29 11:22:28 |                |               |                |               |        |                    |            |     |               |        |          |
           462 |        |          1 |            |                | 2022-03-29 11:29:33 |      1 |                   2 |        1 |                        | 2022-03-29 11:29:33 |                |               |                |               |        |                    |            |     |               |        |          |
(2 rows)

commands

/ojs/tools# php deleteSubmissions.php 461
/ojs/tools# php deleteSubmissions.php 462