Please see:

http://drupal.org/node/1552326

We see same problem while using signature_forums with shib_auth module (http://drupal.org/project/shib_auth): when new user comes to the site for first time and his/hers account is being created by shib_auth/drupal it ends up with the error:

PDOException: SQLSTATE[HY000]: General error: 1364 Field 'signature' doesn't have a default value: INSERT INTO {users} (uid, name, pass, created, access, status, init) 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#012(#012    [:db_insert_placeholder_0] => 143#012    [:db_insert_placeholder_1] => XXXXXX#012    [:db_insert_placeholder_2] => XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX#012    [:db_insert_placeholder_3] => XXXXXXX#012    [:db_insert_placeholder_4] => 1347262287#012    [:db_insert_placeholder_5] => 1#012    [:db_insert_placeholder_6] => XXXXXXX#012)#012 in drupal_write_record() (line 7013 of /XXXXX/drupal/includes/common.inc).

The offending code is:

unset($schema['users']['fields']['signature']['default']);

at line 50 of signature_forum.install which will set 'users' table 'signature' column default value to NULL while drupal 7 DB schema specifies this column as 'NOT NULL' without default value...

Jarek

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mattreba’s picture

I am also experiencing this issue. For our site this occurs with Drupal Commerce creating a new user during checkout.

stephen.punwasi’s picture

I've got the same issue with hybridauth. I gather because of the null issue it would be an issue for any non-native registration. Whoops!

topdillon’s picture

I have the same issue. If it is interacting with another module, I couldn't say which one, but I am not using another authentication module. Any attempt at creating a new user gives the same error as in op.

Anonymous’s picture

I'm experiencing this same error when setting up facebook connect on my site.

What is being accomplished by unsetting that schema variable? If it's a necessary function of the module, I'm sure there's another work around.

Liam McDermott’s picture

Priority: Normal » Critical

I didn't do the D7 port, and don't know that much about how it works (that is if it works!) I also do not understand why unsetting the default value is necessary. The reason it's like that is not documented in the code and it's causing horrible issues, so I'm not averse to ripping it out.

Liam McDermott’s picture

Title: signature_forum causes login issues when used with other modules. » Login issues when used with authentication modules.
FileSize
425 bytes

Fixed in commit f1a0824.

BUT I believe there is another step required to update the schema on sites where the module is already installed. So, here's a patch for that, would someone mind testing it and letting me know whether it works?

Liam McDermott’s picture

Status: Active » Needs review
Liam McDermott’s picture

Status: Needs review » Active

So this was fixed, however I just committed a fix for something else that will re-introduce this bug.

I'm working on a resolution now.

Liam McDermott’s picture

Status: Active » Fixed

Finally! Fixed in commit 5ed411c.

Status: Fixed » Closed (fixed)

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