Upgrade to 3.3.0.8 An unexpected error has occurred

Dear all,

I upgraded our OJS now from 3.1 to 3.3.0.8
In some of my journals i get the following error on the Submissions tab:
“An unexpected error has occurred. Please reload the page and try again.”

In the log I got the following error, can you please help???


[Wed Sep 08 13:53:05.629930 2021] [php7:notice] [pid 3708] [client x.x.x.x:18083] Slim Application Error:\nType: Exception\nMessage: Could not determine the workflow stage id from submission file 2113 with file stage 1\nFile: xxx/lib/pkp/classes/services/PKPSubmissionFileService.inc.php\nLine: 777\nTrace: #0 xxx/lib/pkp/classes/services/PKPSubmissionFileService.inc.php(190): PKP\\Services\\PKPSubmissionFileService->getWorkflowStageId(Object(SubmissionFile))\n#1 xxx/lib/pkp/classes/services/PKPSubmissionFileService.inc.php(224): PKP\\Services\\PKPSubmissionFileService->getProperties(Object(SubmissionFile), Array, Array)\n#2 xxx/classes/services/GalleyService.inc.php(154): PKP\\Services\\PKPSubmissionFileService->getFullProperties(Object(SubmissionFile), Array)\n#3 xxx/classes/services/GalleyService.inc.php(179): APP\\Services\\GalleyService->getProperties(Object(ArticleGalley), Array, Array)\n#4 xxx/lib/pkp/classes/services/PKPPublicationService.inc.php(208): APP\\Services\\GalleyService->getSummaryProperties(Object(ArticleGalley), Array)\n#5 [internal function]: PKP\\Services\\PKPPublicationService->PKP\\Services\\{closure}(Object(ArticleGalley))\n#6 xxx/lib/pkp/classes/services/PKPPublicationService.inc.php(210): array_map(Object(Closure), Array)\n#7 xxx/lib/pkp/classes/services/PKPPublicationService.inc.php(235): PKP\\Services\\PKPPublicationService->getProperties(Object(Publication), Array, Array)\n#8 xxx/lib/pkp/classes/services/PKPSubmissionService.inc.php(204): PKP\\Services\\PKPPublicationService->getSummaryProperties(Object(Publication), Array)\n#9 [internal function]: PKP\\Services\\PKPSubmissionService->PKP\\Services\\{closure}(Object(Publication))\n#10 xxx/lib/pkp/classes/services/PKPSubmissionService.inc.php(208): array_map(Object(Closure), Array)\n#11 xxx/lib/pkp/classes/services/PKPSubmissionService.inc.php(297): PKP\\Services\\PKPSubmissionService->getProperties(Object(Submission), Array, Array)\n#12 xxx/lib/pkp/api/v1/_submissions/PKPBackendSubmissionsHandler.inc.php(160): PKP\\Services\\PKPSubmissionService->getBackendListProperties(Object(Submission), Array)\n#13 [internal function]: PKPBackendSubmissionsHandler->getMany(Object(Slim\\Http\\Request), Object(APIResponse), Array)\n#14 xxx/lib/pkp/lib/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Array, Object(Slim\\Http\\Request), Object(APIResponse), Array)\n#15 xxx/lib/pkp/lib/vendor/slim/slim/Slim/Route.php(281): Slim\\Handlers\\Strategies\\RequestResponse->__invoke(Array, Object(Slim\\Http\\Request), Object(APIResponse), Array)\n#16 xxx/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\\Route->__invoke(Object(Slim\\Http\\Request), Object(APIResponse))\n#17 xxx/lib/pkp/lib/vendor/slim/slim/Slim/Route.php(268): Slim\\Route->callMiddlewareStack(Object(Slim\\Http\\Request), Object(APIResponse))\n#18 xxx/lib/pkp/lib/vendor/slim/slim/Slim/App.php(503): Slim\\Route->run(Object(Slim\\Http\\Request), Object(APIResponse))\n#19 xxx/lib/pkp/classes/security/authorization/internal/ApiAuthorizationMiddleware.inc.php(77): Slim\\App->__invoke(Object(Slim\\Http\\Request), Object(APIResponse))\n#20 [internal function]: ApiAuthorizationMiddleware->__invoke(Object(Slim\\Http\\Request), Object(APIResponse), Object(Slim\\App))\n#21 xxx/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ApiAuthorizationMiddleware), Array)\n#22 [internal function]: Slim\\DeferredCallable->__invoke(Object(Slim\\Http\\Request), Object(APIResponse), Object(Slim\\App))\n#23 xxx/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\\DeferredCallable), Object(Slim\\Http\\Request), Object(APIResponse), Object(Slim\\App))\n#24 xxx/lib/pkp/classes/security/authorization/internal/ApiCsrfMiddleware.inc.php(46): Slim\\App->Slim\\{closure}(Object(Slim\\Http\\Request), Object(APIResponse))\n#25 [internal function]: ApiCsrfMiddleware->__invoke(Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#26 xxx/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ApiCsrfMiddleware), Array)\n#27 [internal function]: Slim\\DeferredCallable->__invoke(Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#28 xxx/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\\DeferredCallable), Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#29 xxx/lib/pkp/classes/security/authorization/internal/ApiTokenDecodingMiddleware.inc.php(121): Slim\\App->Slim\\{closure}(Object(Slim\\Http\\Request), Object(APIResponse))\n#30 [internal function]: ApiTokenDecodingMiddleware->__invoke(Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#31 xxx/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ApiTokenDecodingMiddleware), Array)\n#32 [internal function]: Slim\\DeferredCallable->__invoke(Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#33 xxx/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\\DeferredCallable), Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#34 xxx/lib/pkp/classes/handler/APIHandler.inc.php(68): Slim\\App->Slim\\{closure}(Object(Slim\\Http\\Request), Object(APIResponse))\n#35 [internal function]: APIHandler->{closure}(Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#36 xxx/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)\n#37 [internal function]: Slim\\DeferredCallable->__invoke(Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#38 xxx/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\\DeferredCallable), Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#39 xxx/lib/pkp/classes/handler/APIHandler.inc.php(127): Slim\\App->Slim\\{closure}(Object(Slim\\Http\\Request), Object(APIResponse))\n#40 [internal function]: APIHandler->{closure}(Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#41 xxx/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)\n#42 [internal function]: Slim\\DeferredCallable->__invoke(Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#43 xxx/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\\DeferredCallable), Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#44 xxx/lib/pkp/classes/handler/APIHandler.inc.php(132): Slim\\App->Slim\\{closure}(Object(Slim\\Http\\Request), Object(APIResponse))\n#45 [internal function]: APIHandler->{closure}(Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#46 xxx/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)\n#47 [internal function]: Slim\\DeferredCallable->__invoke(Object(Slim\\Http\\Request), Object(APIResponse), Object(Closure))\n#48 xxx/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_us

@eddoff

There is apparently some problems in some submissions that I think I imported with Native XML some year ago. But I don’t know how to solve it. One doublett was removed, but the others still cause problems - at least in the Archive tab. It seems that the database refers to the wrong folder.

This is where the database refer to the file:


MariaDB [ojs]> select * from files where file_id = '1622';                                                                                                +---------+--------------------------------------------------------+------------                                                                          -----+
| file_id | path                                                   | mimetype                                                                                  |
+---------+--------------------------------------------------------+------------                                                                          -----+
|    1622 | journals/5/articles/814//814-97-2118-43-1-20180608.pdf | application                                                                          /pdf |
+---------+--------------------------------------------------------+------------                                                                          -----+

The actual file is located in:

/**uploads-folder**/journals/5/articles/814/public/814-97-2118-43-1-20180608.pdf`

Somewhere in the upgrade “public” is removed in the path. I am not a pro in SQL. Is there a smart way of correcting this error in the database? Or is it just to reimport these articles again?

Thankful for your answers!

@eddoff

An update, still not solved this issue!

I found that the PDF:s of these articles was not downloadable from the frontend.

However, the following MySQL-command solved the PDF issue:

UPDATE files SET path = Replace(path, '//', '/public/');`

Now PDF:s can be downloaded on the frontend, but it did not solve the issue in the submissions. Is it something with the file stage number? In the error above the file stage number is “1”. If I change this number, what to change it to?

Is it connected to this issue?

@eddoff

Hi!

I solved this issue myself!
I changed the file_stage from 1 to 10 with the MySQL command:

UPDATE submission_files SET file_stage = 10 WHERE file_stage = '1';

Best regards, @eddoff

1 Like

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