Unassigned submission list not working after upgrade

We upgraded from 3.1.2.1 to 3.3.0.8 and this error still exists. Yes, the patch is in the code now.

Hi @molnart,
You commented on an older topic so I have created a new one here for your issue. To confirm, you are reporting this problem with the unassigned submission list not working after upgrading to 3.3.0-8, and you have applied the patch from the forum post? Are there any further details you can share with us about the problem you’re experiencing which could help us understand what’s going on?

Hi, @kshuttle,
We upgraded from 3.1.2.1 to 3.3.0.8. The patch is already in it, (from 3.3.0.6), and really, our system administrator compared the patch and source of 3.3.0.8. But the new submissions list and the unassigned submissions do not shown.

Hi @molnart,

Is there anything relevant in your PHP error log when you try to load those pages?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi, @asmecher thank you for your question. The error code is:
[23-Nov-2021 10:08:47 UTC] Slim Application Error:
Type: Exception
Message: Could not determine the workflow stage id from submission file 241 with file stage 0
File: /var/www/html/ojs-3.3.0-8/lib/pkp/classes/services/PKPSubmissionFileService.inc.php
Line: 777
Trace: #0 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/services/PKPSubmissionFileService.inc.php(190): PKP\Services\PKPSubmissionFileService->getWorkflowStageId(Object(SubmissionFile))
#1 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/services/PKPSubmissionFileService.inc.php(224): PKP\Services\PKPSubmissionFileService->getProperties(Object(SubmissionFile), Array, Array)
#2 /var/www/html/ojs-3.3.0-8/classes/services/GalleyService.inc.php(154): PKP\Services\PKPSubmissionFileService->getFullProperties(Object(SubmissionFile), Array)
#3 /var/www/html/ojs-3.3.0-8/classes/services/GalleyService.inc.php(179): APP\Services\GalleyService->getProperties(Object(ArticleGalley), Array, Array)
#4 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/services/PKPPublicationService.inc.php(208): APP\Services\GalleyService->getSummaryProperties(Object(ArticleGalley), Array)
#5 [internal function]: PKP\Services\PKPPublicationService->PKP\Services{closure}(Object(ArticleGalley))
#6 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/services/PKPPublicationService.inc.php(210): array_map(Object(Closure), Array)
#7 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/services/PKPPublicationService.inc.php(235): PKP\Services\PKPPublicationService->getProperties(Object(Publication), Array, Array)
#8 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/services/PKPSubmissionService.inc.php(204): PKP\Services\PKPPublicationService->getSummaryProperties(Object(Publication), Array)
#9 [internal function]: PKP\Services\PKPSubmissionService->PKP\Services{closure}(Object(Publication))
#10 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/services/PKPSubmissionService.inc.php(208): array_map(Object(Closure), Array)
#11 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/services/PKPSubmissionService.inc.php(297): PKP\Services\PKPSubmissionService->getProperties(Object(Submission), Array, Array)
#12 /var/www/html/ojs-3.3.0-8/lib/pkp/api/v1/_submissions/PKPBackendSubmissionsHandler.inc.php(160): PKP\Services\PKPSubmissionService->getBackendListProperties(Object(Submission), Array)
#13 [internal function]: PKPBackendSubmissionsHandler->getMany(Object(Slim\Http\Request), Object(APIResponse), Array)
#14 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Array, Object(Slim\Http\Request), Object(APIResponse), Array)
#15 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(APIResponse), Array)
#16 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke(Object(Slim\Http\Request), Object(APIResponse))
#17 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(APIResponse))
#18 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(APIResponse))
#19 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/security/authorization/internal/ApiAuthorizationMiddleware.inc.php(77): Slim\App->__invoke(Object(Slim\Http\Request), Object(APIResponse))
#20 [internal function]: ApiAuthorizationMiddleware->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Slim\App))
#21 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ApiAuthorizationMiddleware), Array)
#22 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Slim\App))
#23 /var/www/html/ojs-3.3.0-8/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))
#24 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/security/authorization/internal/ApiCsrfMiddleware.inc.php(46): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))
#25 [internal function]: ApiCsrfMiddleware->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#26 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ApiCsrfMiddleware), Array)
#27 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#28 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#29 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/security/authorization/internal/ApiTokenDecodingMiddleware.inc.php(121): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))
#30 [internal function]: ApiTokenDecodingMiddleware->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#31 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ApiTokenDecodingMiddleware), Array)
#32 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#33 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#34 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/handler/APIHandler.inc.php(68): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))
#35 [internal function]: APIHandler->{closure}(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#36 /var/www/html/ojs-3.3.0-8/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(APIResponse), Object(Closure))
#38 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#39 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/handler/APIHandler.inc.php(127): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))
#40 [internal function]: APIHandler->{closure}(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#41 /var/www/html/ojs-3.3.0-8/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(APIResponse), Object(Closure))
#43 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#44 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/handler/APIHandler.inc.php(132): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))
#45 [internal function]: APIHandler->{closure}(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#46 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)
#47 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#48 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#49 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))
#50 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(APIResponse))
#51 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/handler/APIHandler.inc.php(124): Slim\App->process(Object(Slim\Http\Request), Object(APIResponse))
#52 [internal function]: APIHandler->{closure}(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#53 /var/www/html/ojs-3.3.0-8/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(APIResponse), Object(Closure))
#55 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#56 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/handler/APIHandler.inc.php(132): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))
#57 [internal function]: APIHandler->{closure}(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#58 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)
#59 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#60 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Closure))
#61 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))
#62 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(APIResponse))
#63 /var/www/html/ojs-3.3.0-8/lib/pkp/lib/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(APIResponse))
#64 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/core/APIRouter.inc.php(115): Slim\App->run()
#65 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/core/Dispatcher.inc.php(144): APIRouter->route(Object(Request))
#66 /var/www/html/ojs-3.3.0-8/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))
#67 /var/www/html/ojs-3.3.0-8/index.php(68): PKPApplication->execute()
#68 {main}
View in rendered output by enabling the “displayErrorDetails” setting

Hi @molnart,

Can you try the following SQL query? If it lists any results, they are bad data and should be removed. (Make sure you take a good database backup before doing this.)

SELECT * FROM submission_files WHERE file_stage=0;

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
We have found three rows with file_stage 0. We tried to delete them, but
delete from submission_files WHERE file_stage=0; ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (absojs.submission_file_revisions, CONSTRAINT submission_file_revisions_submission_file_id_foreign FOREIGN KEY (submission_file_id) REFERENCES submission_files (submission_file_id))
so we followed this: Upgrade to 3.3.0.8 An unexpected error has occurred - #3 by eddoff
and we changed the value 0 to 1 with no result, then to 10, which really helped.
But these very early 3 files become available too on the unassigned list. We could not deleted them.
So finally we assigned them to a technical support user to ending the disturbance in the Force.
What do you suggest, which file_stage would be the best to not to show these unnecessary files?
After your suggestion this thread coud be closed. Thank you!

Hi @molnart,

The file_stage constants are defined here:

…so a 10 corresponds to a “proof” file, which is normally associated with a galley.

I can’t comment on the best work-around without knowing more about where those files came from, so you might want to investigate what kinds of files the are, e.g. by looking at their entries in the files table (see the file_id column).

Regards,
Alec Smecher
Public Knowledge Project Team