When I try to set up an account I get a blank Name and Description, and when I run Cron I get this:

user warning: Field 'last_refresh' doesn't have a default value query: INSERT INTO twitter_account (twitter_uid, screen_name, name, description, location, followers_count, profile_image_url, url, protected) VALUES (15339935, 'zafsk', 'Joda Thongnopnua', '', 'Chattanooga, TN', 0, 'http://s3.amazonaws.com/twitter_production/profile_images/56301895/alttab-avi_normal.jpg', '', 0) in C:\server\includes\common.inc on line 3303.

I am not quite sure what that means. but it doesn't update to twitter either. Pretty annoying, and I wanted to have this functional when I launch my site. Thanks in advance..

-Joda

CommentFileSizeAuthor
#6 twitter.inc_.patch2.4 KBMichael Phipps

Comments

modctek’s picture

Wow, it exploded on my site too. This is what happens when Cron runs:

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/modctek1/public_html/sites/all/modules/twitter/twitter.inc:430 Stack trace: #0

Log reports: "Cron run exceeded the time limit and was aborted."

Coming back to the admin page, I got a whole bunch of this too:

warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 34: parser error : Opening and ending tag mismatch: meta line 7 and head in /home/modctek1/public_html/sites/all/modules/twitter/twitter.inc on line 430.

dan.thompson’s picture

Same error here when I visit cron.php. Looks like a bug in twitter to me.

pfaocle’s picture

See here? Possible duplicate, with Eaton commenting this should be fixed in 6.x-2.x-dev.

eaton’s picture

There are a number of situations where the module doesn't properly account for bogus data coming back from twitter -- Fail Whales and other such bits cause it to choke. I'm digging deeper to see if I can make it a bit more robust.

jaydub’s picture

#301317: SQL errors on editing Twitter Accounts

If the original poster was using PostgreSQL then it's likely that the
error on the INSERT was due to the lack of a DEFAULT value as
detailed in the above issue.

Michael Phipps’s picture

Priority: Critical » Normal
Status: Active » Needs review
StatusFileSize
new2.4 KB

I've noticed that _twitter_request_failure() only has limited error codes to handle all responses from Twitter. I've patched this function in twitter.inc to include all the documented error messages, which handle issues like fail whale.

This is my first attempt at ever providing a patch, so I've probably done it all wrong and posted it in the wrong place. I've also modified error messages which some may not like.

Anyway - hopefully it's a kick start.

Michael Phipps’s picture

Priority: Normal » Critical

woops... sorry - didn't mean to change the priority.

eaton’s picture

Title: Simply won't work... » Support more HTTP responses
Status: Needs review » Fixed

Thanks for the updated error codes -- I've committed them to the dev branch and will be testing it for a whil before rolling a 2.1 branch. Thanks! Feel free to give the dev branch a spin and see if it works a bit better.

Feel free to create a new issue when a patch like this is submitted, it definitely deserves its own thread!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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