Closed (fixed)
Project:
RealChat module
Version:
7.x-1.0-alpha2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Jul 2009 at 14:49 UTC
Updated:
3 May 2011 at 19:33 UTC
I followed the instruction to install the RealChat Server, and then set up the Control Center, get the URL, and also install the module in drupal. I can get the Chat URL link to access and use the RealChat. However I have 2 issues:
1. the link "Chat Now!" always link to the "http://localhost/drupal/chatnow_link", I don't know how to correct this to link to the right Chat URL. Fyi, I already maintained the Chat URL as "http://192.168.1.100:XXX/?0,0,0,0,0" in the admin config setting.
2. What should I do to automatically let user login with their drupal username in RealChat and also use Avatar (user picture)?
Comments
Comment #1
crotown commentedIt sounds like you have it set up right.
The "Chat now!" link on your Drupal site will always point to your_Drupal_site/chatnow_link' . A user clicking that link tells your site to run some PHP code in the RealChat module that sends a big complicated link to the chat server. The beginning of what it sends is the "Chat link" you set in the administration settings and then there is a long string that sets the chat nickname to the Drupal username, the chat profile to the Drupal user's profile, the chat avatar to the Drupal user's picture, the close link to return to on your Drupal site to "Close link", and (if you have entered an authentication key) sets the HMAC authentication key to something based on the "Authentication key" in admin settings and much of the other stuff. Then if the RealChat server is using HMAC authentication it can verify that the link was made with the same authentication key that it has -- so it knows it came from a trusted source. If you get an authentication failure verify what the server authentication key is set to and make sure the one in the admin settings on your drupal site is identical.
So, the basic thing to do us just click the "Chat now!" link as a certain user and make sure you go into a chat on the RealChat server. That means the 'magic' is all working right .
The chat nickname and the avatar will be set automatically as part of the 'magic'. Note that the chat server may not show your picture to you if you are the only person in the chat. So you may have to run two different browsers and chat as two different users to see that it is working from each chatter's point of view.
-Steve Cronen-Townsend
www.crotown.com
Comment #2
crotown commentedComment #3
crotown commentedOops, I shouldn't have closed this yet.
Comment #4
babymission commentedI tried both cases, disable or enabled the HMAC authoentication key (also assigned the same authentication in Admin settings), but when I clicked the "Chat NOW!" link, it just showed me a blank page, I didn't see the 'magic' that you described'. I don't know what else need to be set. Please advise.
Comment #5
crotown commentedSince you seem to be able to access the administrative part of the chat server, try these steps:
1. Go to the "Server" tab in the left sidebar. Set authentication to "disabled" (for now).
2. Hit the "Apply changes" button.
3. Go to the "Client" tab in the left sidebar. Click on the "Chat URL" link.
This should cause your browser to ask for a nickname and then enter a chatroom. Are you chatting at this point? Or what happens, if not?
This is a good checkpoint since these steps have nothing to do with Drupal -- just the chat server and your browser. So if you aren't able to chat at this point, it's a RealChat support issue. Your browser must support Javascript to even access the RealChat control center but perhaps there are more subtle compatibility issues related to this.
Comment #6
babymission commentedI can enter the chatroom and chat via the "Chat URL" link. It is only the problem that i can't connect it in drupal via the "chat now!' link.
Comment #7
crotown commentedOK, so it's definitely something with Drupal.
1. One thing to check in that the Chat URL link is pasted into the "Administer | Settings | RealChat". It sounds like you've got it there, but just make sure. And hit "Save configuration" an extra time to make sure. My value for this field on a local site is "http://192.168.1.100:8080/?0,0,0,0,0".
2. Another thing that can be wrong is that the menu router can be screwed up so that clicking the "Chat now!" link doesn't call the proper function in the RealChat module. That might explain the symptoms you are getting. Try visiting the module page at "Administer | Site Building | Modules" and hitting "Save configuration". This will cause the menu router table to be rebuilt from scratch. Also look for any errors at the top of this page after it reloads since it reports missing ".module" files and things. Something causing your problem might be reported there.
3. A good general troubleshooting measure is visiting "Administer | Reports | Status report" which will check various things related to the overall health of your site. Fix any problems you find.
Any of those help? Thanks for sticking with it.
Comment #8
babymission commentedI did all you told me. But it still did not work (just returned me a blank page when I clicked the Chat Now! link). I also checked the Status report, and no specific errors were found.
Comment #9
crotown commentedPlease try doing a clean Drupal install (6.13) and just installing the RealChat module. Then try configuring the RealChat module and try the "Chat now!" link.
Do you see any evidence of the long URL the module generated to connect to the chat server? A screen shot may help me diagnose the situation.
Comment #10
crotown commentedComment #11
enrico200165 commentedI met first exactly the same situation described by the OP (Real Chat server works perfectly with direct connections, but get blank page when trying to go through drupal) and then a different behaviour (see below).
I have applied your troubleshooting suggestions several times with no success, any further troubleshooting advice is most welcome (am new to drupal with minimal knowledge of Drupal and PHP but maybe can set up a dev/debug environment).
Both Drupal and real chat server are installed on a home PC behind a simple modem router.
The internal address of the Ubuntu PC that hosts them both is 192.168.12.
I access Drupal and Real Chat server (trial version) from "outside" (my office) via DNS (dyndns) and NAT configured on my home router.
I have tried using as URL chat URL both internal address http://192.168.1.2:8080/?0,0,0,0,0 and http://mydnsname:8080/?0,0,0,0,0.
In both cases I get: "HTTP 500 - Internal server error Internet Explorer"
and when refreshing the home page I see in the log
"Notice: Trying to get property of non-object in realchat_chatnow_link() (line 62 of /mnt/web/htdocs/drupal7/sites/all/modules/realchat/realchat.module)."
(I also tried with firefox, both locally to the Ubuntu server and externally, with similar results)
Comment #12
enrico200165 commentedIn further troubleshooting I have noticed that it is possible to get into touch anonymously, without logging into Drupal, this works both from inside and from outside my home lan.
When logged into Drupal things do not work, as described in my previous report.
Comment #13
enrico200165 commentedchanging line 62 from
if (module_exists('image') && $style = variable_get('user_picture_style', '') )
to
if (module_exists('image') && $picture && $style = variable_get('user_picture_style', '') )
seems to fix the problem
Comment #14
crotown commentedThanks for the fix, I will verify and test and post when the fix is checked in. But it *looks* correct to me.
-Steve C-T
Comment #15
crotown commentedShould be fixed by the 7.x-1.0-beta2 release. Please check.
Comment #16
crotown commented