You are here

Drupal's Twitter module: Column 'twitter_uid' cannot be null

Submitted by Druss on Tue, 2014-03-25 23:18

I tried installing the Twitter module for a client and ran into the following error during authentication (oauth):

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'twitter_uid' cannot be null: INSERT INTO {twitter_account} …

As it turns out, this is due to a bum install of the module. (As as happened to me before) Drupal's installation system is a little borked as it doesn't handle dependencies terribly well. When I installed the module, Drupal also asked and installed its dependencies (Views, etc.). This triggered a fuck-up at some point.

Fixing this was as simple as disabling and purging the Twitter module from Drupal and reinstalling (enabling) it. All is hunky dory now.

Moral of the story: Only install one module at a time in Drupal.