Submission error after upgrade to 3.2.1-1

Hi all,
I upgraded from 3.1.2-1 to 3.2.1-1 and did the following to have a successful upgrade:

I run debian and postgresql 12.

When I try to Submit an article, clicking “Save and Continue” it gets stuck and I get 2 errors.
ERROR: duplicate key value violates unique constraint “controlled_vocab_symbolic”
This became quiet in the error logs with the following patch:

I can not find a sollution for the other problem, postgresql log:
ERROR: null value in column “submission_id” violates not-null constraint
2020-09-24 12:49:23.772 CEST [5629] ojs@ojs DETAIL: Failing row contains (4505, null, 0, a@mail.addr, 14, 1, 1440).
STATEMENT: INSERT INTO authors (email, include_in_browse, publication_id, user_group_id) VALUES ( $1, $2, $3, $4)

Apache log:
PHP Fatal error: Uncaught Exception: DB Error: ERROR: null value in column “submission_id” violates not-null constraint\nD
ETAIL: Failing row contains (4506, null, 0, a@mail.addr, 14, 1, 1441). Query: INSERT INTO authors (email, include_in_browse, publication_id, user_group_id) VALUES (?, ?, ?, ?) in /var/www/html/ojs/lib/pk
p/classes/db/DAO.inc.php:703\nStack trace:\n#0 /var/www/html/ojs/lib/pkp/classes/db/DAO.inc.php(231): DAO->handleError(Object(ADODB_postgres8), ‘INSERT INTO aut…’)\n#1 /var/www/html/ojs/lib/pkp/classes/db/Sch
emaDAO.inc.php(79): DAO->update(‘INSERT INTO aut…’, Array)\n#2 /var/www/html/ojs/lib/pkp/classes/submission/form/PKPSubmissionSubmitStep1Form.inc.php(428): SchemaDAO->insertObject(Object(Author))\n#3 /var/www
/html/ojs/lib/pkp/pages/submission/PKPSubmissionHandler.inc.php(171): PKPSubmissionSubmitStep1Form->execute()\n#4 /var/www/html/ojs/lib/pkp/classes/core/PKPRouter.inc.php(391): PKPSubmissionHandler->saveStep(Ar
ray, Object(Request))\n#5 /var/www/html/ojs/lib/pkp/classes/core/PKPPageRouter.inc.php in /var/www/html/ojs/lib/pkp/classes/db/DAO.inc.php on line 703, referer: https://journal.interbull.org/index.php/ib/submis\
sion/wizard

Would appriciate some help here!

Many thanks in advance!
Marcus

Hi @marcus1,

I’d suggest checking your old database to see if there are any entries in the authors table that have a submission_id that doesn’t correspond to an entry in the submissions table. You can do that with the following SQL query:

SELECT a.author_id FROM authors a LEFT JOIN submissions s ON (s.submission_id = a.submission_id) WHERE s.submission_id IS NULL;

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
I tried the query in both the old and the new database, but there were zero rows returned.
So apparently authors seem to correspond to to the submissions table.

Regards
Marcus

Hi @marcus1,

Ah, I see the problem – this is similar to the issue you encountered here, but this time with the NOT NULL constraint on the submission_id column in the authors table. You can remove the constraint using:

ALTER TABLE authors ALTER COLUMN submission_id DROP NOT NULL;

Regards,
Alec Smecher
Public Knowledge Project Team