Error while submitting the unsubscribe form.

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null: INSERT INTO {unsubscribe} (uid, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => 1449042568 ) in unsubscribe_user_add() (line 386 of unsubscribe/unsubscribe.module).

Patch to fix this is attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vaibhav571 created an issue. See original summary.

vaibhav571’s picture

Maedi’s picture

Priority: Normal » Critical

No question about it, the line...

$mail = $form_state['values']['mail'];

...must be in the function for the module to work.

+1 for this patch/adding in the line. It fixes an otherwise broken module.

oemb29’s picture

I added the line Worked but displays this issue:

Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 175 of /home/xx/public_html/x/includes/entity.inc).
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 388 of /home/xx/public_html/x/includes/entity.inc).
Notice: Trying to get property of non-object in unsubscribe_user_check() (line 331 of /home/xx/public_html/x/sites/all/modules/unsubscribe/unsubscribe.module).