[OJS 3.3.0-7 with Postgres] Error publishing an issue

When we view an issue to be published, it has all the correct articles. But when publishing, we found the following error and none of the articles appear. What could be happening?

after publishing:
![image|456x500](upload://x1b8LPw3dgMHYFA8WXZLgYy1tWK.png)
preview: 
![image|355x500](upload://dRlf7GrkMqNhLJVlRLPHkMVeYXo.png)

stack trace:

[Mon Aug 23 16:41:38.164493 2021] [php7:error] [pid 32060] [client 172.20.7.116:51777] PHP Fatal error:  Uncaught PDOException: SQLSTATE[42P10]: Invalid column reference: 7 ERROR:  there is no unique or exclusion constraint matching the ON CONFLICT specification in /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115\nStack trace:\n#0 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute(NULL)\n#1 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(489): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('insert into "cu...', Array)\n#3 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\\Database\\Connection->runQueryCallback('insert into "cu...', Array, Object(Closure))\n#4 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(496): Illuminate\\Database\\Connection->run('insert into "cu...', Array, Object(Closure))\n#5 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/staudenmeir/laravel-upsert/src/Query/Builder.php(92): Illuminate\\Database\\Connection->affectingStatement('insert into "cu...', Array)\n#6 /var/www/ojs-3.3.0-7/lib/pkp/classes/db/DAO.inc.php(150): Staudenmeir\\LaravelUpsert\\Query\\Builder->upsert(Array, Array)\n#7 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(699): DAO->replace('custom_issue_or...', Array, Array)\n#8 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(464): IssueDAO->resequenceCustomIssueOrders(17)\n#9 /var/www/ojs-3.3.0-7/classes/controllers/grid/issues/IssueGridHandler.inc.php(545): IssueDAO->updateObject(Object(Issue))\n#10 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPRouter.inc.php(395): IssueGridHandler->unpublishIssue(Array, Object(Request))\n#11 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)\n#12 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route(Object(Request))\n#13 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))\n#14 /var/www/ojs-3.3.0-7/index.php(68): PKPApplication->execute()\n#15 {main}\n\nNext Doctrine\\DBAL\\Driver\\PDO\\Exception: SQLSTATE[42P10]: Invalid column reference: 7 ERROR:  there is no unique or exclusion constraint matching the ON CONFLICT specification in /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18\nStack trace:\n#0 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(117): Doctrine\\DBAL\\Driver\\PDO\\Exception::new(Object(PDOException))\n#1 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(489): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('insert into "cu...', Array)\n#3 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\\Database\\Connection->runQueryCallback('insert into "cu...', Array, Object(Closure))\n#4 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(496): Illuminate\\Database\\Connection->run('insert into "cu...', Array, Object(Closure))\n#5 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/staudenmeir/laravel-upsert/src/Query/Builder.php(92): Illuminate\\Database\\Connection->affectingStatement('insert into "cu...', Array)\n#6 /var/www/ojs-3.3.0-7/lib/pkp/classes/db/DAO.inc.php(150): Staudenmeir\\LaravelUpsert\\Query\\Builder->upsert(Array, Array)\n#7 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(699): DAO->replace('custom_issue_or...', Array, Array)\n#8 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(464): IssueDAO->resequenceCustomIssueOrders(17)\n#9 /var/www/ojs-3.3.0-7/classes/controllers/grid/issues/IssueGridHandler.inc.php(545): IssueDAO->updateObject(Object(Issue))\n#10 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPRouter.inc.php(395): IssueGridHandler->unpublishIssue(Array, Object(Request))\n#11 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)\n#12 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route(Object(Request))\n#13 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))\n#14 /var/www/ojs-3.3.0-7/index.php(68): PKPApplication->execute()\n#15 {main}\n\nNext Illuminate\\Database\\QueryException: SQLSTATE[42P10]: Invalid column reference: 7 ERROR:  there is no unique or exclusion constraint matching the ON CONFLICT specification (SQL: insert into "custom_issue_orders" ("issue_id", "journal_id", "seq") values (1329, 17, 1) on conflict ("issue_id", "journal_id") do update set "issue_id" = "excluded"."issue_id", "journal_id" = "excluded"."journal_id", "seq" = "excluded"."seq") in /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php:671\nStack trace:\n#0 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\\Database\\Connection->runQueryCallback('insert into "cu...', Array, Object(Closure))\n#1 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(496): Illuminate\\Database\\Connection->run('insert into "cu...', Array, Object(Closure))\n#2 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/staudenmeir/laravel-upsert/src/Query/Builder.php(92): Illuminate\\Database\\Connection->affectingStatement('insert into "cu...', Array)\n#3 /var/www/ojs-3.3.0-7/lib/pkp/classes/db/DAO.inc.php(150): Staudenmeir\\LaravelUpsert\\Query\\Builder->upsert(Array, Array)\n#4 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(699): DAO->replace('custom_issue_or...', Array, Array)\n#5 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(464): IssueDAO->resequenceCustomIssueOrders(17)\n#6 /var/www/ojs-3.3.0-7/classes/controllers/grid/issues/IssueGridHandler.inc.php(545): IssueDAO->updateObject(Object(Issue))\n#7 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPRouter.inc.php(395): IssueGridHandler->unpublishIssue(Array, Object(Request))\n#8 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)\n#9 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route(Object(Request))\n#10 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))\n#11 /var/www/ojs-3.3.0-7/index.php(68): PKPApplication->execute()\n#12 {main}\n  thrown in /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671, referer: https://periodicos.ufes.br/simbiotica/manageIssues
[Mon Aug 23 16:41:55.636933 2021] [php7:error] [pid 31725] [client 172.20.7.116:56960] PHP Fatal error:  Uncaught PDOException: SQLSTATE[42P10]: Invalid column reference: 7 ERROR:  there is no unique or exclusion constraint matching the ON CONFLICT specification in /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115\nStack trace:\n#0 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute(NULL)\n#1 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(489): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('insert into "cu...', Array)\n#3 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\\Database\\Connection->runQueryCallback('insert into "cu...', Array, Object(Closure))\n#4 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(496): Illuminate\\Database\\Connection->run('insert into "cu...', Array, Object(Closure))\n#5 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/staudenmeir/laravel-upsert/src/Query/Builder.php(92): Illuminate\\Database\\Connection->affectingStatement('insert into "cu...', Array)\n#6 /var/www/ojs-3.3.0-7/lib/pkp/classes/db/DAO.inc.php(150): Staudenmeir\\LaravelUpsert\\Query\\Builder->upsert(Array, Array)\n#7 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(699): DAO->replace('custom_issue_or...', Array, Array)\n#8 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(464): IssueDAO->resequenceCustomIssueOrders(17)\n#9 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(270): IssueDAO->updateObject(Object(Issue))\n#10 /var/www/ojs-3.3.0-7/classes/controllers/grid/issues/IssueGridHandler.inc.php(481): IssueDAO->updateCurrent(17, Object(Issue))\n#11 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPRouter.inc.php(395): IssueGridHandler->publishIssue(Array, Object(Request))\n#12 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)\n#13 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route(Object(Request))\n#14 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))\n#15 /var/www/ojs-3.3.0-7/index.php(68): PKPApplication->execute()\n#16 {main}\n\nNext Doctrine\\DBAL\\Driver\\PDO\\Exception: SQLSTATE[42P10]: Invalid column reference: 7 ERROR:  there is no unique or exclusion constraint matching the ON CONFLICT specification in /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18\nStack trace:\n#0 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(117): Doctrine\\DBAL\\Driver\\PDO\\Exception::new(Object(PDOException))\n#1 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(489): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('insert into "cu...', Array)\n#3 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\\Database\\Connection->runQueryCallback('insert into "cu...', Array, Object(Closure))\n#4 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(496): Illuminate\\Database\\Connection->run('insert into "cu...', Array, Object(Closure))\n#5 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/staudenmeir/laravel-upsert/src/Query/Builder.php(92): Illuminate\\Database\\Connection->affectingStatement('insert into "cu...', Array)\n#6 /var/www/ojs-3.3.0-7/lib/pkp/classes/db/DAO.inc.php(150): Staudenmeir\\LaravelUpsert\\Query\\Builder->upsert(Array, Array)\n#7 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(699): DAO->replace('custom_issue_or...', Array, Array)\n#8 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(464): IssueDAO->resequenceCustomIssueOrders(17)\n#9 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(270): IssueDAO->updateObject(Object(Issue))\n#10 /var/www/ojs-3.3.0-7/classes/controllers/grid/issues/IssueGridHandler.inc.php(481): IssueDAO->updateCurrent(17, Object(Issue))\n#11 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPRouter.inc.php(395): IssueGridHandler->publishIssue(Array, Object(Request))\n#12 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)\n#13 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route(Object(Request))\n#14 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))\n#15 /var/www/ojs-3.3.0-7/index.php(68): PKPApplication->execute()\n#16 {main}\n\nNext Illuminate\\Database\\QueryException: SQLSTATE[42P10]: Invalid column reference: 7 ERROR:  there is no unique or exclusion constraint matching the ON CONFLICT specification (SQL: insert into "custom_issue_orders" ("issue_id", "journal_id", "seq") values (1329, 17, 1) on conflict ("issue_id", "journal_id") do update set "issue_id" = "excluded"."issue_id", "journal_id" = "excluded"."journal_id", "seq" = "excluded"."seq") in /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php:671\nStack trace:\n#0 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\\Database\\Connection->runQueryCallback('insert into "cu...', Array, Object(Closure))\n#1 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(496): Illuminate\\Database\\Connection->run('insert into "cu...', Array, Object(Closure))\n#2 /var/www/ojs-3.3.0-7/lib/pkp/lib/vendor/staudenmeir/laravel-upsert/src/Query/Builder.php(92): Illuminate\\Database\\Connection->affectingStatement('insert into "cu...', Array)\n#3 /var/www/ojs-3.3.0-7/lib/pkp/classes/db/DAO.inc.php(150): Staudenmeir\\LaravelUpsert\\Query\\Builder->upsert(Array, Array)\n#4 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(699): DAO->replace('custom_issue_or...', Array, Array)\n#5 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(464): IssueDAO->resequenceCustomIssueOrders(17)\n#6 /var/www/ojs-3.3.0-7/classes/issue/IssueDAO.inc.php(270): IssueDAO->updateObject(Object(Issue))\n#7 /var/www/ojs-3.3.0-7/classes/controllers/grid/issues/IssueGridHandler.inc.php(481): IssueDAO->updateCurrent(17, Object(Issue))\n#8 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPRouter.inc.php(395): IssueGridHandler->publishIssue(Array, Object(Request))\n#9 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)\n#10 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route(Object(Request))\n#11 /var/www/ojs-3.3.0-7/lib/pkp/classes/core/PKPApplication.i

regards,

Hi @Adriano_Jose,

Can you indicate the specific version (e.g. OJS 3.3.0-7) number of OJS you’re using, please?

-Roger
PKP Team

Hi @rcgillis,
It’s this version: OJS 3.3.0-7.
Preview:
image

After publish:
image

I recently upgraded from 3.2.1-4 to 3.3.0-7 and needed to follow the instructions in this topic to get it:

I don’t know if there is any connection, but in this post, I put two other errors that have appeared in the error log:

Regards,

Hi @Adriano_Jose,

Thank you for this additional information. I will see if one of our other team members can assist with this when they are available.

Best regards,

Roger
PKP Team

Hi @rcgillis,
I noticed that this issue that is having problems when publishing, was all made with the Quick Submission puglin. Is this the reason?

regards,

Hi @rcgillis,
We noticed another interesting situation:
Submissions remain scheduled, even after the issue is published.
Captura de Tela 2021-09-01 às 16.36.00

So, without unpublishing the issue, going to view the submission, unschedule

Captura de Tela 2021-09-01 às 16.23.58

and schedule it again for the same issue,
Captura de Tela 2021-09-01 às 16.26.56

it automatically appears published.
Captura de Tela 2021-09-01 às 16.27.10

It seems like some failure in the use of the postgres database that doesn’t happen in mysql. Is that so?

2 Likes

Hi @Adriano_Jose,

Thank you for the update. I have forwarded this request to our team and when they are available, they will try to assist.

Best regards,

-Roger
PKP Team

3 Likes