You are viewing the PKP Support Forum | PKP Home Wiki

not null constraint error when recording 'Revisions Required

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

not null constraint error when recording 'Revisions Required

Postby mbjones » Tue Jan 08, 2008 1:59 pm


Thanks for the great software. I'm looking forward to using OCS for our conference, but I ran into a database error that prevents the review system from working properly for me. I'm getting a database error using OCS 2.0.0-1 and postgres 7.4. The problem is that when a Director tries to record "Revisions Required" for the decision for a paper, a database error is thrown:

"ERROR: null value in column "type" violates not-null constraint"

causing the action to fail. You can see the error text and more details in my bug report (http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=3153). This appears to be related to bug # 3004 where the not null constraint on edit_decisions.type column was apparently removed. However, from psql I see that the not null constraint is still intact on my copy of the database (see psql output in the bug report). Does release 2.0.0-1 not have the changes that were made in Bug # 3004?

Looking at the code in:
TrackDirectorSubmissionDAO.inc.php line 166
it appears that no attempt to provide a value for the type column is made with the SQL insert, and so the not null constraint can't possibly be satisfied. Could this be the problem? Is it safe for me to remove the not null constraint on that column? Or should the SQL insert be providing a value for 'type'?

Thanks for your advice and help.

Posts: 1
Joined: Tue Jan 08, 2008 1:46 pm

Re: not null constraint error when recording 'Revisions Required

Postby asmecher » Tue Jan 08, 2008 4:09 pm

Hi Matt,

The fix for that bug is not included in OCS 2.0; it'll be included in the next release. In the meantime, it's safe to drop the NOT NULL constraint on that column.

Alec Smecher
Public Knowledge Project Team
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Return to OCS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests