Closed (fixed)
Project:
Facebook-style Statuses (Microblog)
Version:
6.x-2.x-dev
Component:
Code - Functionality
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
19 May 2009 at 05:36 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent
Comments
Comment #1
ionchannels commentedI should also add the following:
I am updating the status from a block. The status is still updating, but only after I reload the page. The following entry appears in my /var/log/httpd/access_log:
"POST /facebook_status/js HTTP/1.1" 500 - "http://www....
Comment #2
icecreamyou commentedDo you have the Twitter module installed? I made a mistake in the Twitter integration that can cause this to happen...
What version of PHP do you have? What type and version of SQL? Do you have any JavaScript-related modules installed?
What pages is this happening on? Are there multiple status update forms on the same page?
Did you upgrade from a previous version of FBSS or install it for the first time? If you upgraded, did you run update.php?
This is a really vague error (status code 500 basically means "something's wrong but the server doesn't know what") and I haven't experienced your problem (unless it's related to Twitter) so I will need to know as much information as you can give me about your system in order to solve this problem.
Comment #3
icecreamyou commentedComment #4
ionchannels commentedHi, thanks for the reply and help. I do have the twitter module installed. I have disabled posting to twitter, but the error still comes up. I am using PHP 5.2 and MySQL 5. I have a number of AJAX modules installed including most of the AJAX integration modules. I had popups and popups_reference installed, but I've removed these with no effect.
This error is occurring on all pages and I am posting through the block and I have only 1 status update on the page. I have been upgrading since the first 1.0 release. When I upgraded to the 2.x branch, I completely uninstalled the module and reinstalled and yes, I ran update.php like clockwork.
I am posting the results from the javascript console via firebug in hopes that it might shed light on the problem. It looks like jquery might be part of the problem??:
Here are the response headers:
Response Headers
Date
Tue, 19 May 2009 14:59:58 GMT
Server
Apache/2.2.3 (CentOS)
X-Powered-By
PHP/5.2.4
Expires
Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified
Tue, 19 May 2009 14:59:58 GMT
Cache-Control
store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Length
0
Connection
close
Content-Type
text/html; charset=utf-8
Request Headers
Host
www.labpage.org
User-Agent
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
Accept
application/json, text/javascript, */*
Accept-Language
en-us,en;q=0.5
Accept-Encoding
gzip,deflate
Accept-Charset
ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive
300
Connection
keep-alive
Content-Type
application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With
XMLHttpRequest
Referer
http://www.labpage.org/
Content-Length
153
Cookie
cacherouter=1; __utma=246001945.1161013349.1240243248.1242741455.1242743445.98; __utmv=246001945.authenticated
%20user%2CLab%20Member; SESSd3a16e7ef61686af0f93e987d218898b=09c1vlumbtb71cqtdqnnp88p22; __utmz=246001945
.1240243250.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __gads=ID=f870cb1cf7aa9692:T=1240241562
:S=ALNI_MaxLbe1DNpmeb_lYmUmyDvT5yye9w; has_js=1; __utmc=246001945; __utmb=246001945.4.10.1242743445
and then the post:
form_build_id form-7872534c847dfe89cdc10ce49684e79d
form_id _facebook_status_status
form_token 473ee457e479e9313f98cc22034bbc35
op Save
status is testing
and then the response:
POST http://www.labpage.org/facebook_status/js http://www.labpage.org/facebook_status/js 500 Internal Server Error 343ms jquery.js?g (line 13)
Params
Comment #5
ionchannels commentedOne thing, I am using jquery update, but it seems to be using jquery 1.2.6. I'm not sure why. Should I change to jquery 1.3.2?
Comment #6
icecreamyou commentedI'm not sure how you know that it's using JQuery 1.2.6, but if you think this is the case even though you're using JQuery Update, this is probably a bug with JQuery Update (or you may not have installed it correctly). FBSS handles very little of its own JavaScript; most of it is default Drupal behavior, so I'd say the issue likely rests with one of the JQuery modules you're using.
Of course, there could be a conflict between FBSS and one of those modules, rather than the fault lying entirely on those modules.
At this point I recommend that you uninstall all JQuery-related modules one by one, reversing whatever steps you took to install them (for instance, you're supposed to replace core Drupal files when you install JQuery Update) and test FBSS after each one to see if it works. If you find the one that's the conflict, reinstall it, carefully following the install/upgrade instructions. If the conflict is still there, at least we know which module to address.
Comment #7
ionchannels commentedI have disabled all extraneous javascript modules and I still get the error... I'm now using jquery 1.3.2. I have noticed the following coding problem in the status update form:
See the id in the form action is "-facebook-status-status". I've never seen an id starting with a dash - is this correct for this module?
Comment #8
icecreamyou commentedYes, the ID is fine. It's just the name of the function that defines the form, _facebook_status_status, with underscores converted to hyphens.
If you're using JQuery 1.3.2, you haven't disabled all extraneous JavaScript modules; you're still using JQuery Update, even if the module itself is disabled. Please try to revert to the state of JavaScript you'd have with a clean Drupal install (JQuery 1.2.6 with no JS modules enabled).
Comment #9
ionchannels commentedThanks for the advice. I disabled all modules and started enabling them one at a time. Turns out it was the activity module http://www.drupal.org/project/Activity that seems to conflict. Ironically these were the 2 modules that I wanted to work together. I was using 6.x-2.x of the activity module. I will try the 6.x.1.x branch of the activity module and report back.
Comment #10
ionchannels commentedI also get the same error when I try to post my status to twitter. Very strange....
Comment #11
icecreamyou commentedWow, I definitely didn't expect that... thanks for being so cooperative in helping to track this down. I'm really busy this week but I'll try to look into it also. Actually now that I think about it, I'm not surprised it doesn't work, because I'm pretty sure I wrote the integration for Activity 1.x. Hmm. It used to be that I would have problems with people being on Activity 4.x instead of the stable 3.x branch... people just aren't getting what they need out of that module yet evidently, heh. It's getting there though...
Anyway, it should be possible for me to provide integration with both branches, but it will be a little bit until I have time to figure that one out, so marking as postponed. Do let me know if the Activity 1.x integration works though, because the testing I did on that was very light compared to how much I've tested all the other features, and I'm probably missing some steps (like if a status is deleted, the corresponding Activity record isn't deleted with it).
Comment #12
ionchannels commentedOK, I've installed activity 6.1.1 and I no longer get the javascript error. However, status updates don't seem to be recorded as I expected. That's OK for us right now. We plan on upgrading to the activity 2 branch once the javascript error is resolved. Thanks again for your help.
Comment #13
mrjavum commentedIntegration with Activity 2.x is rather simple (at first look). The module has good developer documentation and the good example of integration is flag_friend module. I undrestand code but have poor experience to integrate both branches together.
Comment #14
icecreamyou commentedMy experience working with Activity has been that the developers are great people who are nice to work with, but documentation used to be pretty sparse. I haven't checked in awhile though and I'll try to get to that this weekend if possible although it may be the following weekend before I have a chance.
Comment #15
dicreat commentedSubscribe.
I have the same error after installing Activity 2 module.
Comment #16
icecreamyou commentedActivity 6.2 integration is partially fixed locally (will be in CVS soon). Basically, there are no errors anywhere, and setting up Activity messages basically works, but they don't get recorded when a status is submitted. I'm not sure why that is, but it's quite befuddling. I think part of the problem is that the new access control system seems really limiting.
Marking with the activity2-integration tag to hopefully get some eyes on this from the Activity maintainers...
Comment #17
icecreamyou commentedAlright, so there was an obstacle: Trigger integration was broken and I didn't know it. But it's fixed now, and Activity 2 integration works, albeit with an error about being unable to insert a row into {activity_targets}, and with the caveat that FBSS tokens aren't getting run for some reason.
This is the last thing on my to-do list before RC, unless other bug reports pop up, so I'd love some help on this if anyone is capable of helping.
Having said that, the DB error seems to be related to the fact the Activity doesn't seem to want to take two "user" parameters in the $context from the trigger functions, so fixing that might have to be postponed until Activity 2 is more mature. I really have no idea about the token replacement, but it's not going anywhere fast.
I'll be AFK next week. If no one does any work on this before I get back, I'm going to mark back to postponed and just go ahead and release the RC.
Comment #18
subho007 commentedComment #19
icecreamyou commentedThis is a feature that needs work and isn't completely in yet, not a bug report on an existing feature. This is particularly true because I don't know whether the problem is in FBSS or Activity.
Comment #20
subho007 commentedlooking at the codes in facebook_status.module the function
should be installed for basic information exchange with activity 2 which is same as activity 1, and is already present.
Then
is replaced with the name function
function facebook_status_activityapi(&$activity, $op)withfunction facebook_status_activity_access_api(&$activity, $op)then again looking at this block
i found you need to replace the function name with:
function facebook_status_activity($owner, $poster, $status)to
function facebook_status_activity_grants($owner, $poster, $status)comment out this lines because in activity2 we dont need this
need to search what
activity_insert($account->uid, 'facebook_status', 'status', 'update', $data, $target_users_roles);can be replaced with. I think you need more instances of activity function... a little help from here:>>
will be used instead....
I was just going through and checking up
Never Mind that i made the status to bug-fix because i thought activity2 is now used by many!!
Sorry!! ;)
Comment #21
icecreamyou commentedThanks for your help!
A few things: first of all it looks like you're looking at the Beta 4 release instead of the most recent dev (which has the almost-complete integration in it). Also, my goal is not to replace Activity 1 integration with Activity 2, it's to integrate with both. To that end, we get functions like this:
That is in fact the only function required for Activity 2 integration. I've been through the developer docs several times and I can't figure out why this is not enough. I've tried using the optional hooks as well and the result doesn't change.
I've tracked the problem to the fact that the activity_record() function in Activity 2, which seems to somehow get called by the Trigger module, doesn't have the right UID in $context['facebook_status']->uid. That would be related to the Trigger integration in FBSS presumably, which looks like this:
...however, that works for Trigger, so I would have expected it to work for Activity as well. I'm quite confused about that right now.
Finally, the function facebook_status_activity is not part of Activity integration at all--it's a helper function I wrote to simplify the process for Activity 1.
Thanks for your help though! Hopefully this will get figured out soon.
Comment #22
Scott Reynolds commentedSubscribing and personally volunteer to fix it for ya. (/me one of the maintainers of Activity2)
Comment #23
4drian commentedThis would be the icing on the cake for a personal project of mine. No input to make I'm afraid but figured this is better than just saying "subscribe". Best of luck with your efforts.
Comment #24
icecreamyou commented@Scott: Awesome, thanks! As I said I'll be gone next week but of course let me know if there's anything I can do for you.
@adrianlewis: Thanks. :)
Comment #25
subho007 commentedOhkay i get it!! I am soo sorry!! i did not noticed the dev version..... well i will check it out and let you inform if i can help you ;)
Comment #26
icecreamyou commentedThat's perfectly fine--it's always a good thing to try to help, even if that help is a little misguided. :-) Your effort is appreciated.
Comment #27
Scott Reynolds commentedMake this:
Into
There will be a problem though with token replacements as your objects ('owner' and 'poster') are not standard drupal object names ('user', 'account'). This will cause Token to not know how to handle those.
Comment #28
icecreamyou commentedSeems to work--thanks very much. I fixed the tokens too. Will commit momentarily.
Comment #29
icecreamyou commentedCommitted, thanks again Scott! Leaving early tomorrow; will post an RC when I get back if there aren't any major bugs.