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.
Comments
Comment #1
Chris Graham commentedI'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.
Comment #2
juanbond commentedI'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.
Comment #3
ptaff commentedThis also happens on
twitter-7.x-4.1. The return value oftwitter_connect()is not checked hence it's possible theuser_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 whentwitter_connect()returnsFALSE.Comment #4
juanbond commentedGreat, thanks. This worked for me. Was able to run cron.
Comment #5
memcinto commentedYes 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.)
Comment #6
juampynr commentedFixed in 6.x-5.x branch.