When trying to add an organization I get the error:
DatabaseTransactionNoActiveException: in DatabaseConnection->rollback() (regel 1035 van/var/xxxxx/includes/database/database.inc).

and in the log is also:

PDOException: SQLSTATE[HY000]: General error: 1364 Field 'revision_id' doesn't have a default value: INSERT INTO {redhen_org} (type, label, author_uid, primary_contact_id, redhen_state, created, updated) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => organisatie [:db_insert_placeholder_1] => orgeen [:db_insert_placeholder_2] => 1 [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => 1365433060 [:db_insert_placeholder_6] => 1365433060 ) in drupal_write_record() (regel 7136 van /var/xxxxxx/includes/common.inc).

I saw a patch org-revisions.patch but that one is not working correctly and not for this version.

Please help

Comments

wmfinnegan’s picture

I'm getting the same error - I tried upgrading to the dev version of Entity API, but that didn't help either...

levelos’s picture

Status: Active » Fixed

Sorry folks, fixed in 816ba188e8af353fe79b27a17133a1fd8e4f7841.

fenstrat’s picture

Status: Fixed » Needs review
StatusFileSize
new845 bytes

While #2 fixes the error on new installs it doesn't for existing installs.

The attached ads a hook_update_N() to get the schema back in sync for existing installs.

levelos’s picture

Status: Needs review » Fixed

Thanks fenstrat, fixed ine5b4b47.

fenstrat’s picture

No worries thank Lev, and for the commit credit.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

groovehunter’s picture

I got that on a fresh 1.3 , is a new issue needed or change version here?

  • Commit 816ba18 on 7.x-1.x, tests, redhen-donation by levelos:
    #1964530: Add default value for new revision column in redhen_org schema...
  • Commit e5b4b47 on 7.x-1.x, tests, redhen-donation authored by fenstrat, committed by levelos:
    #1964530 by fenstrat: Add default value to the redhen_org.revision_id...

  • Commit 816ba18 on 7.x-1.x, tests, redhen-donation, relation-roles by levelos:
    #1964530: Add default value for new revision column in redhen_org schema...
  • Commit e5b4b47 on 7.x-1.x, tests, redhen-donation, relation-roles authored by fenstrat, committed by levelos:
    #1964530 by fenstrat: Add default value to the redhen_org.revision_id...