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

CommentFileSizeAuthor
#5 friendfeed.274763-7.patch836 bytesmicahw156

Comments

robloach’s picture

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.

micahw156’s picture

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

robloach’s picture

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.

steve hanson’s picture

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.

micahw156’s picture

StatusFileSize
new836 bytes

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

robloach’s picture

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

jonathanbloom’s picture

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.

robloach’s picture

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

jonathanbloom’s picture

I'm only using Drupal 5 right now.