Hi, I'm using this code you provided me with:

global $user; print facebook_status_form_display(NULL, $user->uid);

But it's showing the status of the node author rather than the logged in user. How do I make it into the logged in user? Thanks.

Comments

icecreamyou’s picture

Problem confirmed in 6.x, not an issue in 5.x. It should not be a problem because it's set up correctly and the only thing changed in the last 6.x-dev was a few instances of theme_username() to theme('username') and the unrelated addition of facebook_status_user('load'). Reverting the changes doesn't fix it as far as I can tell. How frustrating.

The problem is that facebook_status_form_display is not passing $uid to the form-builder function. I don't know why and I won't have time to figure it out until at least Tuesday. For an immediate solution, try using the previous -dev...

Flying Drupalist’s picture

Ahh, eh. Would you happen to have a copy still around? :D I don't have a copy anymore.

icecreamyou’s picture

The CVS repository keeps everything. All you need is this version of facebook_status.module.

Flying Drupalist’s picture

Hmm I'm using that old version of of the module, but I still have this problem. Maybe it's not that file that's causing it...

icecreamyou’s picture

That is my suspicion, since what was changed was unrelated to anything like this. I have no idea why it would suddenly stop working but I've had several frustrating, similar problems with this module.

I have zero time until December 19, after which I will do whatever I can to fix it. I'd like to get a fully working Beta out by early January.

Flying Drupalist’s picture

Thanks for the update. :)

Flying Drupalist’s picture

Hi, if this is a clue.

I have the status printed on the comment. When using the live module to preview the comment, the status being shown is the node author's rather than the commenter's. Or maybe this is just a symptom of the same problem.

icecreamyou’s picture

It's unrelated I believe, and not fixable, since the necessary UID in that case is probably computed via a DB call to a comment. Since the comment doesn't exist yet the call returns NULL so it defaults to the node author.

PGiro’s picture

Assigned: Unassigned » PGiro
Status: Active » Needs review

You need to remove the formstate from your get form call. The following function replacement works for me. Can anyone confirm on their project ?

function facebook_status_form_display($form_state = NULL, $uid = 0) {
  return drupal_get_form('facebook_status_update', $uid);
}
icecreamyou’s picture

Status: Needs review » Fixed

Committed locally, but untested. Will release a new dev later this week.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

michtoen’s picture

This issue is still there in the 6.x-1.0-beta1 , the status is wild changing in the blocks depending on the viewed content.

michtoen’s picture

Status: Closed (fixed) » Active
icecreamyou’s picture

Status: Active » Closed (fixed)

That's the intended behavior. This was a special issue where I gave Miraploy specific code that wasn't working. If you want the status shown to always be the current user's, use the code at the top of the page.