SMF, users and messages not shown

174 views
Skip to first unread message

Pipo de Clown

unread,
Jul 28, 2014, 3:52:00 AM7/28/14
to ajax...@googlegroups.com
When I open Ajax-chat via SMF (logged in at SMF) the chat window opens properly but no online users are shown at the right side of the chat. At least I should see my own name.

When I type an message and hit Enter the message isn't shown in the chatbox.

When I take a look in the database I can see myself as an online member in the database table and I can see the messages I've typed in the message table.

So, everything seems to work fine except showing the users and the messages.

In the config file I've changed the type to "text" because otherwise the whole textscreen wasn't shown and I had an error "headers already send".

Somebody any idea how to solve this ?question


Doc gWorldz

unread,
Jul 28, 2014, 4:40:06 PM7/28/14
to ajax...@googlegroups.com
I might be wrong but I think it should be 'text/html' not just 'text' but I don't know what the issue is :(

Frug

unread,
Jul 29, 2014, 11:46:35 AM7/29/14
to ajax...@googlegroups.com
It should be text/html


or if you like technical jargon http://tools.ietf.org/html/rfc2854

Ivan Vasilev

unread,
Jul 31, 2014, 4:49:04 AM7/31/14
to ajax...@googlegroups.com
I have the same problem. I installed the SMF version on SMF 2.0.8.

Users can't see the chat correctly on all browsers except Firefox. Firefox works for all users... all other browsers fail to display users list and messages. Browsers that can't display the chat are able to send messages.

Frug

unread,
Jul 31, 2014, 5:45:17 PM7/31/14
to ajax...@googlegroups.com
I can't think of any way browser version could matter when it comes to integration version. If you can connect with firefox, the problem is something else.

I don't think your problem is related to Pipo's problem.

@Pipo de Clown: I recall that your scenario can happen if the SQL server has the wrong timezone set. This was fixed in 0.8.7 : https://github.com/Frug/AJAX-Chat/issues/85

So if you're using 0.8.7 this shouldn't happen, but you may still want to look at your timezone settings.

Frug

unread,
Jul 31, 2014, 5:49:17 PM7/31/14
to ajax...@googlegroups.com
Also you can try the messy fix of setting 
RequestMessagesPriorChannelEnter = true; 
in your config.php which should force it to go away even if the timezone is borked.

Ivan Vasilev

unread,
Jul 31, 2014, 9:23:38 PM7/31/14
to ajax...@googlegroups.com
Hi,

RequestMessagesPriorChannelEnter = true; was set true by default I think. It doesn't fix it.

The real problem is the XML. I get an XML parsing error in Chrome for example. I changed the content type from NULL to TEXT/HTML. This makes the chat load but with the described behavior ... no users, no messages displayed. Maybe Pipo tried doing the same thing in order to fix the XML issue.

I tried saving the resulting XML, which contains BOM I guess. After saving the XML without BOM, Chrome is happy with it. I tried saving all php files without BOM but I still get BOM in my XML ?!?! Where is this XML generated? There is one BOM added at the beginning of the XML and it shouldn't be there!
Maybe Firefox removes this BOM from the beginning of the XML and that's why it works fine.

Any ideas on how to fix that BOM issue?

Ivan Vasilev

unread,
Aug 1, 2014, 6:17:23 AM8/1/14
to ajax...@googlegroups.com
Hi,

the BOM problem was fixed successfully. The problem was that I had installed SAChat for SMF 2.0.8. which is not good at all. The SAChat had some LANG php files with BOM which were causing the issue. Once they were fixed, everything works fine.

Having in mind, that SAChat is something I added to the clean SMF version, I can say that AJAX Chat itself is working properly. Now all users can join the chat from all kind of browsers and devices.

Great job, Frug! :D

Pipo de Clown

unread,
Aug 1, 2014, 4:02:53 PM8/1/14
to ajax...@googlegroups.com
Config says text/html indeed.

I've tried to run the chat in firefox with still the same problem.

I'm running version 0.8.7 so the timezone problem is also solved. (I've checked it)

The only called solution I didn't comletly check out was the BOM.
I.ve checked the du and the uk language files, notepad++ told me they where withouth BOM's
What other files should I check for BOM's to get this solved ?


Op vrijdag 1 augustus 2014 12:17:23 UTC+2 schreef Ivan Vasilev:

Frug

unread,
Aug 2, 2014, 11:01:10 AM8/2/14
to ajax...@googlegroups.com
None of the files on github have BOMs, the only way they could get there is if you edit something in some windows text editor. 

It really really sounds to me like it must be the timezone problem. Your database is getting the messages, but when your javascript client asks it for new messages, it comes up with none. Did you try what I suggested and set it to show previous messages when you enter chat? 

You can try opening your browser inspector, clicking on the console tab and see if javascript is throwing errors. Beyond that, you'd have to do some proper debugging by viewing the raw ajax output to see why it's not returning anything.

cap...@gmail.com

unread,
Aug 7, 2014, 9:26:34 AM8/7/14
to ajax...@googlegroups.com


About the timestamp problem, this is the code in AJAXclass.php:

[code]
function getMessageCondition() {
$condition = 'id > '.$this->db->makeSafe($this->getRequestVar('lastID')).'
AND (
channel = '.$this->db->makeSafe($this->getChannel()).'
OR
channel = '.$this->db->makeSafe($this->getPrivateMessageID()).'
)
AND
';
if($this->getConfig('requestMessagesPriorChannelEnter') ||
($this->getConfig('requestMessagesPriorChannelEnterList') && in_array($this->getChannel(), $this->getConfig('requestMessagesPriorChannelEnterList')))) {
$condition .= 'NOW() < DATE_ADD(dateTime, interval '.$this->getConfig('requestMessagesTimeDiff').' HOUR)';
} else {
$condition .= 'dateTime >= FROM_UNIXTIME(' . $this->getChannelEnterTimeStamp() . ')';
}
return $condition;
}
[/code]

I don't expect a problem in it because I'm running version 0.8.7


To make it more curious, I have the same problem twice.
I've first installed the chat on my NAS (shadow site) to test it. Because it didn't run well I also installed it at the live site with the same problems.

In the Chrome JavaScript console no errors are shown.
  
  


Op zaterdag 2 augustus 2014 17:01:10 UTC+2 schreef Frug:
Message has been deleted

Chris D

unread,
Apr 15, 2015, 2:53:53 PM4/15/15
to ajax...@googlegroups.com
Curious if a solution was ever found for this, because I'm now experiencing the same issue. I made a change earlier attempting to make a 2nd chat bot, but chat errored, so I removed my change and since then I load chat, nothing, however in the database I can still see logs populating from users even though nothing populates on the screen, noone sees anything though.
Reply all
Reply to author
Forward
0 new messages