I'm getthing the following error when I run drush cron...
WD cron: PDOException: SQLSTATE[HY000]: General error: 1364 Field 'uid' doesn't have a default value: INSERT INTO {twitter_account} [error]
(twitter_uid, screen_name, name, location, description, followers_count, friends_count, statuses_count, favourites_count, url,
protected, profile_image_url, profile_background_color, profile_text_color, profile_link_color, profile_sidebar_fill_color,
profile_sidebar_border_color, profile_background_image_url, profile_background_tile, verified, created_at, created_time, utc_offset)
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, :db_insert_placeholder_7, :db_insert_placeholder_8,
:db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13,
:db_insert_placeholder_14, :db_insert_placeholder_15, :db_insert_placeholder_16, :db_insert_placeholder_17,
:db_insert_placeholder_18, :db_insert_placeholder_19, :db_insert_placeholder_20, :db_insert_placeholder_21,
:db_insert_placeholder_22); Array
(
[:db_insert_placeholder_0] => 30587206
[:db_insert_placeholder_1] => rlnorthcutt
[:db_insert_placeholder_2] => Ron Northcutt
[:db_insert_placeholder_3] => Austin, TX
[:db_insert_placeholder_4] =>
[:db_insert_placeholder_5] => 114
[:db_insert_placeholder_6] => 186
[:db_insert_placeholder_7] => 4307
[:db_insert_placeholder_8] => 11
[:db_insert_placeholder_9] => http://t.co/Meq59KULcI
[:db_insert_placeholder_10] => 0
[:db_insert_placeholder_11] => http://a0.twimg.com/profile_images/1192776077/49936_559179665_2480272_q_normal.jpg
[:db_insert_placeholder_12] => B2DFDA
[:db_insert_placeholder_13] => 333333
[:db_insert_placeholder_14] => 93A644
[:db_insert_placeholder_15] => FFFFFF
[:db_insert_placeholder_16] => EEEEEE
[:db_insert_placeholder_17] => http://a0.twimg.com/images/themes/theme13/bg.gif
[:db_insert_placeholder_18] => 0
[:db_insert_placeholder_19] => 0
[:db_insert_placeholder_20] => Sun Apr 12 02:58:55 +0000 2009
[:db_insert_placeholder_21] => 1239505135
[:db_insert_placeholder_22] => -21600
)
in twitter_account_save() (line 62 of sites/all/modules/twitter/twitter.inc).
Comments
Comment #1
generalredneckLooks like it only happens if I have mentions turned on...
Note my user is the only user on the site...
Comment #2
johnpicozziI'm having a similar problem when adding a Twitter account.
Comment #3
generalredneckDo you have any specifics? like steps to reproduce. I'm assuming you are enabling mentions as well and it most likely fails trying to grab the twitter-user-who-mentioned-you's info. I may be able to do something in the code...
My biggest beef with fixing this issue is I don't know what all is being done with the twitter_accounts. I would love to just assign the uid of 0 to any user that doesn't exist on the site, but I'm sure we would then have to add a hook on user creation to check to see if one of these accounts is one that has been downloaded from twitter before... with God knows what else.
In short... not familiar enough with the code and this one is a bit too big. Lastly the issue isn't affecting me enough (selfish I know). Other issues with other modules are higher on my priority list.
Comment #4
johnpicozziSteps to reproduce...
Hope this helps, Let me know if you need more clarification.
Comment #5
apratt commentedIndeed turning mentions off solved this problem for me.
Angus
Comment #6
xurizaemonFor sites which import mentions, we need to permit some default value (ie NULL) in
{twitter.uid}.Comment #7
jamiehollernI've thrown together a quick patch that would update the twitter_account.uid column to accept NULL values.
Comment #8
damienmckennaTriggering the testbot.
Comment #9
damienmckennaTriggering the testbot.
Comment #13
damienmckennaRerolled.
Comment #14
damienmckennaBackported to the 6.x-5.x branch.
Comment #15
damienmckennaPorted to the 7.x-6.x branch.
Comment #17
damienmckennaCommitted. Thanks!