1 of 3
1
Twitter Timeline Error
Posted: 25 March 2008 02:54 PM   [ Ignore ]  
Grad Student
Rank
Total Posts:  66
Joined  09-26-2006

I came into work and checked my site today to notice the following error on my home page (twice), any ideas on what may be causing it?

I’ve done absolutely nothing to the template code today, the only thing I have done having anthing to do with twitter was the installation of a twitter Vista widget.

Warning: Invalid argument supplied for foreach() in /system/plugins/pi.twitter_timeline.php on line 292

Profile
 
 
Posted: 09 April 2008 05:27 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  236
Joined  05-14-2004

Same thing is happening at my place ... I turned on Template Debugging, but there doesn’t seem to be much there that is useful. All appears normal. The PHP errors I have are:

Notice: Undefined index: user in /system/plugins/pi.twitter_timeline.php on line 187

Notice
: Undefined index: created_at in /system/plugins/pi.twitter_timeline.php on line 249

Notice
: Undefined offset: 1 in /system/plugins/pi.twitter_timeline.php on line 509

Notice
: Undefined offset: 0 in /system/plugins/pi.twitter_timeline.php on line 510

Notice
: Undefined offset: 5 in /system/plugins/pi.twitter_timeline.php on line 512

Notice
: Undefined offset: 2 in /plugins/pi.twitter_timeline.php on line 512

Notice
: Undefined offset: 3 in /system/plugins/pi.twitter_timeline.php on line 512

Notice
: Undefined index: user in /system/plugins/pi.twitter_timeline.php on line 187

Notice
: Undefined index: created_at in /system/plugins/pi.twitter_timeline.php on line 249

Notice
: Undefined offset: 1 in /system/plugins/pi.twitter_timeline.php on line 509

Notice
: Undefined offset: 0 in /system/plugins/pi.twitter_timeline.php on line 510

Notice
: Undefined offset: 5 in /system/plugins/pi.twitter_timeline.php on line 512

Notice
: Undefined offset: 2 in /system/plugins/pi.twitter_timeline.php on line 512

Notice
: Undefined offset: 3 in /system/plugins/pi.twitter_timeline.php on line 512

It appears to be a change at Twitter, since neither of us changed anything on our end. I’d really like to be able to keep using this plug-in, it’s got a coolness and W0W factor that makes my Twitter buddies all jealous and stuff (Dontcha wish your blog was cool like mine!) :D

 Signature 

Oh Really? ~ PhotoLife ~ In Stitches

Profile
 
 
Posted: 11 April 2008 08:41 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  3
Joined  07-05-2002

Weirder is that, from what I can see, my timeline in Expression Engine is messed up, but a timeline in EE Core shows up fine.

Profile
 
 
Posted: 11 April 2008 02:57 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15869
Joined  06-03-2002

Can you go into your /system/cache/twitter_timeline/ folder, open one of the XML files and send me the contents please?  I don’t even have a Twitter account anymore, so I have not kept up with any possible changes made to their API.

 Signature 
Profile
MSG
 
 
Posted: 11 April 2008 03:26 PM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15869
Joined  06-03-2002

Thanks Lissa, but I’d need to copy of what’s being retrieved on a page load where you get the errors.  Since the cache would be overwritten on subsequent requests, use this plugin file, which will write a new cache file containing some debugging information if those variables aren’t set.  It will be in your /system/cache/twitter_timeline/ folder under the name ‘95c073b2b2b12543eb20548527cbd89b’.

If the errors happen again, go look for that file, and then send that to me, please.

File Attachments
pi.twitter_timeline.zip  (File Size: 6KB - Downloads: 109)
 Signature 
Profile
MSG
 
 
Posted: 15 May 2008 09:11 AM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  29
Joined  06-21-2006

Same error, did the above and here’s the log.


1210864099
<?xml version=“1.0” encoding=“UTF-8”?>
<hash>
  <request>/statuses/user_timeline.xml</request>
  <error>Authentication required to request your own timeline.</error>
</hash>

The curl and fsock methods are failing, despite passing correct basic authentication parameters. Perhaps once this is eventually fixed, you can also add @‘s to the function calls so that it fails gracefully?

Profile
 
 
Posted: 15 May 2008 09:24 AM   [ Ignore ]   [ # 6 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15869
Joined  06-03-2002

I see, that’s a change on their end, then, as they used to not send valid XML back for errors, they sent HTML pages.  Using @ would not be advised, as that would not only prevent one from getting the errors that would help discover the problem, but it spawns a number of processes to suppress a PHP error, and should be used sparingly, on functions that can frequently fail in certain environments, not to hide errors caused by faulty program logic.

 Signature 
Profile
MSG
 
 
Posted: 15 May 2008 09:49 AM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15869
Joined  06-03-2002

The plugin has been updated to version 1.1 and will now parse Twitter’s XML error reponses, and display them in the template parsing log.  You can download an updated version here.

 Signature 
Profile
MSG
 
 
Posted: 15 May 2008 12:04 PM   [ Ignore ]   [ # 8 ]  
Summer Student
Total Posts:  29
Joined  06-21-2006

Ok, the error messages are gone, but it’s still not properly authorizing w/ twitter and the same error message shows in the cache file.

Profile
 
 
Posted: 15 May 2008 12:20 PM   [ Ignore ]   [ # 9 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15869
Joined  06-03-2002

The default cache holding time is 15 minutes, so you will need to either manually clear your caches, or temporarily set the twitter_refresh= parameter to a low or zero value to force a fresh request.

 Signature 
Profile
MSG
 
 
Posted: 15 May 2008 12:33 PM   [ Ignore ]   [ # 10 ]  
Summer Student
Total Posts:  29
Joined  06-21-2006

Yup. I’ve been deleting the cache, and it’s still showing the same error message in the cache, and occasionally an error message displayed while loading the page.

1210876257
<?xml version=“1.0” encoding=“UTF-8”?>
<hash>
  <request>/statuses/user_timeline.xml</request>
  <error>Authentication required to request your own timeline.</error>
</hash>

Profile
 
 
Posted: 15 May 2008 12:43 PM   [ Ignore ]   [ # 11 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15869
Joined  06-03-2002

Are you supplying a valid username in the user= parameter, and a password with the password= parameter?  If you are getting other errors, please cut and paste them.  As you can see, it’s working fine here (see sidebar).

 Signature 
Profile
MSG
 
 
Posted: 15 May 2008 12:51 PM   [ Ignore ]   [ # 12 ]  
Summer Student
Total Posts:  29
Joined  06-21-2006

Yah .. so about that not working thing.

Short Answer: Me = Moron. Gmail email addresses end with .com, and not .cmo as I had entered. Usually I pride myself on catching silly errors. Not this time. D’oh.

Thanks Derek.

Profile
 
 
Posted: 15 May 2008 01:07 PM   [ Ignore ]   [ # 13 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15869
Joined  06-03-2002

:-D   Glad to help, and thanks for identifying the problem, leading to the fix.

 Signature 
Profile
MSG
 
 
Posted: 23 May 2008 04:52 PM   [ Ignore ]   [ # 14 ]  
Grad Student
Avatar
Rank
Total Posts:  64
Joined  10-09-2003

I get the same problem every time there’s a technical fault at Twitter.  When I check LissaKay’s site her feed is also not working.

Seeing as Twitter was down for 6 days (in total) over the past year, it might be a good idea to make the plugin a bit more robust?

Profile
 
 
Posted: 23 May 2008 06:03 PM   [ Ignore ]   [ # 15 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15869
Joined  06-03-2002

Did you update to the latest version and clear your caches, bigblue?  Seeing how Lissa hasn’t replied to this thread or me privately since the original correspondence, I gather she has not followed this issue nor applied the fix.  The plugin is now doing all it can to degrade gracefully when Twitter is having service problems.

Where are you getting that statistic, is it published?  Perhaps that is accumulated time of their web service being down?  Interesting in any case, and still remarkably bad considering that it’s spread out over many days during peak usage, but still doesn’t account for other problems such as faulty connectivity, slowness, and data syncing with their API, which can cause any service that uses it to fail at times even when their web service is up.

 Signature 
Profile
MSG
 
 
Posted: 24 May 2008 02:40 AM   [ Ignore ]   [ # 16 ]  
Grad Student
Avatar
Rank
Total Posts:  64
Joined  10-09-2003

Hi Derek, thanks for your prompt reply.

I had applied the fix and cleared my caches. The problem occurs when twitter is down. LissaKay’s twitter timeline also wasn’t working when the site was down and is working now (as is mine, without further intervention).

Part of the problem is that it seems to “break” my template html when Twitter is down. In my case it only occurs when I’m logged on (perhaps it’s the debugging error messages?). However looking at LissaKay’s site yesterday, I most certainly wasn’t logged in and it seemed to “break” her layout too.

The statistic appeared on the Twitter forums - yes, it is the accumulated time they were down over the past 12 months (allegedly).

The output of the Twitter Timeline plugin when Twitter was down was as follows (at both my site and LissaKay’s):

profile image
~ 7 years, 5 months, 3 weeks, 3 days, 18 hours, 59 minutes ago

profile image
~ 7 years, 5 months, 3 weeks, 3 days, 18 hours, 59 minutes ago


The template debugging messages were as per LissaKay’s post above.

Profile
 
 
Posted: 24 May 2008 07:22 AM   [ Ignore ]   [ # 17 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15869
Joined  06-03-2002

What are the contents of your Twitter Timeline cache file at that point, bigblue?  It shouldn’t be making it to variable parsing unless a valid, tweet-filled XML response is received.

 Signature 
Profile
MSG
 
 
Posted: 24 May 2008 08:32 AM   [ Ignore ]   [ # 18 ]  
Grad Student
Avatar
Rank
Total Posts:  64
Joined  10-09-2003

Mmm. Next time it happens I’ll let you know. I didn’t keep a copy.

Profile
 
 
   
1 of 3
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65087 Total Logged-in Users: 42
Total Topics: 82226 Total Anonymous Users: 18
Total Replies: 441924 Total Guests: 214
Total Posts: 524150    
Members ( View Memberlist )