Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi this is the error:
warning: pg_query(): Query failed: ERROR: null value in column "accepted_timestamp" violates not-null constraint in /usr/share/drupal6/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO og_invite (uid, mail, group_nid, sender, moderated, invite_key, token, timestamp) VALUES (0, 'examplemail@example.com', 7, 1, 0, 'nX6dTYhs78', 'dec90bf..::EXAMPLE-TOKEN::..e631b', 1333724817) in /usr/share/drupal6/includes/common.inc on line 3477.
While trying to recreate the db_query directly into postgresql database:
ERROR: null value in column "accepted_timestamp" violates not-null constraint
Checking on the "og_invite" table structure there's a value missing in the query.
I'm checking out the code right now, looks pretty simple to fix since the missing value for timestamp could be just a 0, maybe i'll have a patch this evening...
Any help is appreciated !!
Comment | File | Size | Author |
---|---|---|---|
#1 | og_invite_link-postgresql_insert_fix-1517952_1.patch | 2.07 KB | luisgrisolia |
Comments
Comment #1
luisgrisolia CreditAttribution: luisgrisolia commentedHi, here's a patch i made to manage the problem, i'm not experienced coding drupal's but i'm a coder, i couldn't find the "INSERT" inside this code, but i noted the column in question ("accepted_timestamp") was set to "not NULL" and PostgreSQL was expecting for a value there... What i did was changing that column and subsequents querys realted with, very simple solution but maybe not quite addecuate.
Any feedback is appreciated for learning purposes !!
Comment #2
Liam MorlandTagging