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
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
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.
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?
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.
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.
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>
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).
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.