OMP 3.3.0-7 Create new version of a published monograph (Error)

Hi, I upgraded from version 3.1.1-4 to 3.3.0-7, although I had to fix some issues during the upgrade, I managed to finish successfully. After upgrading, I went to test the system and found that when trying to create a new version of a published monograph, the system shows the error message “An unexpected error has occurred. Please reload the page and try again.” as identified in the image:

Sem título

I saw that this was a bug from previous versions as described in issue #6446 (OMP 3.3 Create new version of a published monograph · Issue #6446 · pkp/pkp-lib · GitHub), but the version I am using is 3.3.0-7. Does anyone know what can be happening? is there a solution for this?

Hello @RRafael,

Thanks for your questions. Are you able to view the PHP error log and tell what errors do you see while getting this problem?

Kind Regards,
Patricia
Public Knowledge Project Team

Hello @pmangahis,

in the php error log shows this:

[php7:notice] Slim Application Error:\nType: Illuminate\Database\QueryException\nCode: 23505\nMessage: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint “chapter_authors_pkey”\nDETAIL: Key (author_id, chapter_id)=(1154, 198) already exists. (SQL: INSERT INTO submission_chapter_authors\n\t\t\t\t(author_id, chapter_id, primary_contact, seq)\n\t\t\t\tVALUES\n\t\t\t\t(1154, 198, 0, 2))\nFile: /var/www/html/omp/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php\nLine: 671\nTrace: #0 /var/www/html/omp/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback(‘INSERT INTO sub…’, Array, Object(Closure))\n#1 /var/www/html/omp/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(496): Illuminate\Database\Connection->run(‘INSERT INTO sub…’, Array, Object(Closure))\n#2 /var/www/html/omp/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php(200): Illuminate\Database\Connection->affectingStatement(‘INSERT INTO sub…’, Array)\n#3 /var/www/html/omp/lib/pkp/classes/db/DAO.inc.php(138): Illuminate\Database\Capsule\Manager::__callStatic(‘affectingStatem…’, Array)\n#4 /var/www/html/omp/classes/monograph/ChapterAuthorDAO.inc.php(96): DAO->update(‘INSERT INTO sub…’, Array)\n#5 /var/www/html/omp/classes/services/PublicationService.inc.php(335): ChapterAuthorDAO->insertChapterAuthor(1154, 198, false, 2)\n#6 /var/www/html/omp/lib/pkp/classes/plugins/HookRegistry.inc.php(107): APP\Services\PublicationService->versionPublication(‘Publication::ve…’, Array)\n#7 /var/www/html/omp/lib/pkp/classes/services/PKPPublicationService.inc.php(485): HookRegistry::call(‘Publication::ve…’, Array)\n#8 /var/www/html/omp/lib/pkp/api/v1/submissions/PKPSubmissionHandler.inc.php(640): PKP\Services\PKPPublicationService->version(Object(Publication), Object(Request))\n#9 [internal function]: PKPSubmissionHandler->versionPublication(Object(Slim\Http\Request), Object(APIResponse), Array)\n#10 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Array, Object(Slim\Http\Request), Object(APIResponse), Array)\n#11 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(APIResponse), Array)\n#12 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke(Object(Slim\Http\Request), Object(APIResponse))\n#13 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(APIResponse))\n#14 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(APIResponse))\n#15 /var/www/html/omp/lib/pkp/classes/security/authorization/internal/ApiAuthorizationMiddleware.inc.php(77): Slim\App->__invoke(Object(Slim\Http\Request), Object(APIResponse))\n#16 [internal function]: ApiAuthorizationMiddleware->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Slim\App))\n#17 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ApiAuthorizationMiddleware), Array)\n#18 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Slim\App))\n#19 /var/www/html/omp/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#20 /var/www/html/omp/lib/pkp/classes/security/authorization/internal/ApiCsrfMiddleware.inc.php(46): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(APIResponse))\n#21 [internal function]: ApiCsrfMiddleware->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))\n#22 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ApiCsrfMiddleware), Array)\n#23 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))\n#24 /var/www/html/omp/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#25 /var/www/html/omp/lib/pkp/classes/security/authorization/internal/ApiTokenDecodingMiddleware.inc.php(121): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(APIResponse))\n#26 [internal function]: ApiTokenDecodingMiddleware->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))\n#27 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ApiTokenDecodingMiddleware), Array)\n#28 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))\n#29 /var/www/html/omp/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#30 /var/www/html/omp/lib/pkp/classes/handler/APIHandler.inc.php(68): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(APIResponse))\n#31 [internal function]: APIHandler->{closure}(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))\n#32 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)\n#33 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))\n#34 /var/www/html/omp/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#35 /var/www/html/omp/lib/pkp/classes/handler/APIHandler.inc.php(127): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(APIResponse))\n#36 [internal function]: APIHandler->{closure}(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))\n#37 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)\n#38 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))\n#39 /var/www/html/omp/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#40 /var/www/html/omp/lib/pkp/classes/handler/APIHandler.inc.php(132): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(APIResponse))\n#41 [internal function]: APIHandler->{closure}(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))\n#42 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)\n#43 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))\n#44 /var/www/html/omp/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#45 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(APIResponse))\n#46 /var/www/html/omp/lib/pkp/lib/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(APIResponse))\n#47 /var/www/html/omp/lib/pkp/classes/handler/APIHandler.inc.php(124): Slim\App->process(Object(Slim\Http\Request), Object(APIResponse))\n#48 [internal function]: APIHandler->{closure}(Object(Slim\Http\Request), Obje

Hello @pmangahis,

is there any solution?

Similar problem here, in OMP 3.3.0.13

Got error 'PHP message: Slim Application Error:\nType: Illuminate\\Database\\QueryException\nCode: 23000\nMessage: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2754-10129' for key 'chapter_authors_pkey' (SQL: INSERT INTO submission_chapter_authors\n\t\t\t\t(author_id, chapter_id, primary_contact, seq)\n\t\t\t\tVALUES\n\t\t\t\t(2754, 10129, 0, 1))\nFile: /omp/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php\nLine: 671\nTrace: #0 omp/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631):
Illuminate\\Database\\Connection->runQueryCallback('INSERT INTO sub...', Array, Object(Closure))\n#1 omp/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(496): Illuminate\\Database\\Connection->run('INSERT INTO sub...', Array, Object(Closure))\n#2 /omp/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Ca...', referer: https://publishing/workflow/index/452/5```