Error retrieving feed from FriendFeed

jonathanbloom - June 25, 2008 - 12:48
Project:FriendFeed
Version:6.x-1.x-dev
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I have FriendFeed installed on Drupal 5.7 and I added the username and API key for my account and it can't retrieve my feed.

The feed in question is at:
http://jonathandbloom.com/user/1/friendfeed

#1

Rob Loach - June 25, 2008 - 17:22

Is your server behind a proxy? Can you use drupal_http_request? I also somewhat expected bugs in the Drupal 5 version. If you find any fixes, please post how you overcame them.

#2

micah - July 2, 2008 - 18:09

Rob,

I can duplicate this. I can retrieve my feed using the block, but not on user/1/friendfeed.

I traced the problem to function friendfeed_user_view, but couldn't figure out how to fix it.

The problem is that $user is not set correctly, so things like $user->name and $user->friendfeed_username cannot be retrieved. It did work if I added global $user; within the function, but only to retrieve my own feed while logged in as me, of course.

Not sure if the calling parameters are messed up, or if a user_load is needed. My knowledge this area aren't strong enough.

Thanks for back-porting this to 5.x, by the way! Glad I don't have to wait to use it!

Micah

#3

Rob Loach - July 2, 2008 - 20:31
Status:active» needs review

Ahhh, it's because in the Drupal 6 menu system, the user object is passed to the function. In Drupal 5, however, just the user ID is passed. I just committed a work around. Again, sorry for not testing, haha.

#4

Steve Hanson - July 3, 2008 - 00:47

This still appears to be broken. With todays release I'm still getting
Invalid argument supplied for foreach() in /var/www/drupalexp/modules/user/user.module on line 53.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT * FROM users u WHERE in /var/www/drupalexp/includes/database.mysqli.inc on line 151.

But the block works.

#5

micah - July 9, 2008 - 00:40

Rob,

This issue is giving me a great crash course in both D5 and D6 APIs, and the differences between them. I'm enjoying it! So, now I know the difference between user_load for D5 and D6. Attached patch changes arguments for user_load to array in both places that it's used. Rolled against the latest (July 2) 5.x-1.x-dev.

Micah

Edit: Sorry. First patch was bad. Only needed change in one place, not both. Uploading friendfeed.274763-6.patch to fix.

Edit again: Arrgh! Replacing patch file again. Try friendfeed.274763-7.patch

AttachmentSize
friendfeed.274763-7.patch 836 bytes

#6

Rob Loach - July 9, 2008 - 03:12

Patch committed.... Thanks, Micah. Hope it helps.

#7

jonathanbloom - July 11, 2008 - 17:56

Sorry, I had company and forgot to respond. Glad to see a patch is in the works and my site isn't behind a proxy.

#8

Rob Loach - July 11, 2008 - 18:20
Version:5.x-1.x-dev» 6.x-1.x-dev

Is this happening on 6.x too? I can't get the feed on my personal site..... http://robloach.net/about

#9

jonathanbloom - July 11, 2008 - 18:46

I'm only using Drupal 5 right now.

 
 

Drupal is a registered trademark of Dries Buytaert.