Drupal 6: upgraded from a 3.x beta to 4.0-beta1. Installed Autoload 6.x-2.1 and OAuth 6.x-3.0-beta4. Installed required library in sites/all/libraries.

Created OAuth app and put the keys in at admin/settings/twitter.

When cron tries to run, it fatals out on:
Fatal error: Call to a member function user_timeline() on a non-object in /home/webfiles/drupal-6.26/sites/all/modules/twitter/twitter.inc on line 101.

With twitter module disabled, cron runs run. If I enable the twitter module, but uncheck "Import Twitter statuses" at admin/settings/twitter, cron will run OK, but the twitter block won't be updated with the latest tweets.

CommentFileSizeAuthor
#3 twitter.user_timeline.patch650 bytesptaff

Comments

Chris Graham’s picture

I'm having this issue too.

Have core and all modules up to date, running beta 4 as well and even though I have my keys in the database it is giving the same error on cron run.

juanbond’s picture

I'm having this issue three.

When cron tries to run, it fatals out on:
Fatal error: Call to a member function user_timeline() on a non-object in /home/webfiles/drupal-6.26/sites/all/modules/twitter/twitter.inc on line 101.

ptaff’s picture

Status: Active » Needs review
StatusFileSize
new650 bytes

This also happens on twitter-7.x-4.1. The return value of twitter_connect() is not checked hence it's possible the user_timeline() method gets called on a non-object.

This mini-patch (based on twitter-7.x-4.1) prevents the error (you may want to hunk the patch for 6.x-4.x). Not sure if there should be a warning displayed and/or sent to watchdog when twitter_connect() returns FALSE.

juanbond’s picture

Great, thanks. This worked for me. Was able to run cron.

memcinto’s picture

Yes I too can now run cron. (Of course the twitter feed is not being updated, but that's a separate issue that I will deal with separately.)

juampynr’s picture

Version: 6.x-4.0-beta1 » 6.x-5.x-dev
Status: Needs review » Fixed

Fixed in 6.x-5.x branch.

Status: Fixed » Closed (fixed)

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