1

Topic: SQL error after login

Hi

I'm using Drupal 6 and SVN Indicia

When I login to the site, I get a box of green text with 3 items: "Why not tell us the area...", "Your account has been configured so that you will receive email updates..." and

"Array ( [error] => general_errors.Validation error code => 2003 [errors] => Array ( [user_email_notification_setting:general] => There was an SQL error: ERROR: new row for relation "user_email_notification_settings" violates check constraint "chk_notification_source_type" DETAIL: Failing row contains (21, 520, PT, D, 2014-11-29 12:47:02, 520, 2014-11-29 12:47:02, 520, f). - INSERT INTO "user_email_notification_settings" ("created_on", "created_by_id", "updated_on", "updated_by_id", "user_id", "notification_source_type", "notification_frequency") VALUES ('20141129 12:47:02', 520, '20141129 12:47:02', 520, 520, 'PT', 'D') ) )"

Any idea how I can fix that error?

Cheers

2

Re: SQL error after login

Hi

I can see from your error message that the chk_notification_source_type constraint is failing.

I can also see that you are trying (or the code you are running is trying) to submit a source type of 'PT'

Looking at the check at https://code.google.com/p/indicia/sourc … ttings.sql I can see that 'PT' is, indeed, not one of the allowed values. (Perhaps it is supposed to be 'VT', meaning Verifier Task)

Looks like a bug that needs fixing but this is as far as I can (or want!) to go on a Saturday night at home.

Jim Bacon.

3 (edited by Jim Bacon 01-12-2014 18:16:04)

Re: SQL error after login

Hi

I had a look at the notifications_email.module file and found that 'PT', meaning, Pending Record Task was a new addition.

A change to the database configuration was committed to the development trunk in r8013 to support the new code. However, this was only partially copied to the branch of the warehouse software we run in r8183

I have
- copied the missing file to the repository (r=8605),
- updated testwarehouse with the change,
- looked at warehouse1 which appears to have been manually updated with the change already. Possibly one of my colleagues has intervened there already.

Could you
a. let me know which warehouse you are working with,
b. try again and let me know if the problem is fixed.

Good luck,
Jim Bacon.

4

Re: SQL error after login

I'm currently on the test warehouse. The problem seems resolved. Thanks.

5

Re: SQL error after login

Excellent. Sounds like we have consistency across the two servers again.
Jim.