A couple of pages' worth of the following errors appears when trying to update a book node's expiry date:
# warning: pg_query() [function.pg-query]: Query failed: ERROR: new row for relation "node_expire" violates check constraint "node_expire_expiremode_check" in /opt/csw/apache2/share/htdocs/drupal-5.2/includes/database.pgsql.inc on line 125.
# user warning: query: INSERT INTO node_expire (nid, expire, expiresec, expiremode, isroot) VALUES (52, '1980-01-01 00:00:00', '', '', 0) in /opt/csw/apache2/share/htdocs/drupal-5.2/includes/database.pgsql.inc on line 144.
# warning: pg_query() [function.pg-query]: Query failed: ERROR: new row for relation "node_expire" violates check constraint "node_expire_expiremode_check" in /opt/csw/apache2/share/htdocs/drupal-5.2/includes/database.pgsql.inc on line 125.
# user warning: query: INSERT INTO node_expire (nid, expire, expiresec, expiremode, isroot) VALUES (52, '1980-01-01 00:00:00', '', '', 0) in /opt/csw/apache2/share/htdocs/drupal-5.2/includes/database.pgsql.inc on line 144.
# warning: pg_query() [function.pg-query]: Query failed: ERROR: new row for relation "node_expire" violates check constraint "node_expire_expiremode_check" in /opt/csw/apache2/share/htdocs/drupal-5.2/includes/database.pgsql.inc on line 125.
# user warning: query: INSERT INTO node_expire (nid, expire, expiresec, expiremode, isroot) VALUES (53, '1980-01-01 00:00:00', '', '', 0) in /opt/csw/apache2/share/htdocs/drupal-5.2/includes/database.pgsql.inc on line 144.
This repeats, with only the first VALUES expression changing (53, 53, 5, etc.) - these values appear to correlate with node numbers for child pages. No rows are present in the node_expire table.
Running Drupal 5.2, PHP 5.2.1, PostgreSQL database 8.2.3.
Comments
Comment #1
astoltz commentedThanks for letting me know.
Does this happen for you on each node?
Does it only happen when editing nodes?
Are you logged on as an admin or a lower-end user?
Does it only happen for book nodes?
Does it happen for all book nodes, just parents, or children?
I'll look into this as soon as I get a chance. That will most likely be this weekend but it may be sooner.
Thanks.
Comment #2
astoltz commentedThis bug has been confirmed and fixed in the latest beta release.
The problem was with the book inheritance feature. When block inheritance isn't checked, the node will load the parent's expiration settings. For the errors you were getting, there was no parent data available. The fix will revert to the available defaults in the case where this isn't found.
This also brought up another bug I found where the block inheritance check box wasn't being honored. That has also been fixed in the latest beta. It will be available once Drupal's packaging system pulls the updates (which should be within the next 12 hours).
Comment #3
Brad_Macpherson commentedFix confirmed - working perfectly now on PostGreSQL. Thanks!
Fix for block-inheritance also confirmed as working.