MyBB Community Forums

Full Version: AjaxChat not working after Upgrade
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Dear all,
i am using Blueimp's AjaxChat on my site. Ever since the 1.8.16 upgrade, it won't open any more. The MyBB integration seems broken. 
Anyone got any idea how to fix this? 


MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
Query: SELECT userID, userName, userRole, channel, UNIX_TIMESTAMP(dateTime) AS timeStamp, ip FROM usr_web22_1.ajaxchat_online ORDER BY userName; Error-Report: Error-Code:


Your copy of MyBB running on Linguisten.de ([url=https://www.linguisten.de/]https://www.linguisten.de[/url]) has experienced an error. Details of the error include:
---
Type: 2
File: chat/lib/class/AJAXChatMySQLQuery.php (Line no. 24)
Message
mysql_query() expects parameter 2 to be resource, object given

Type: 2
File: chat/lib/class/AJAXChatMySQLQuery.php (Line no. 26)
Message
mysql_errno() expects parameter 1 to be resource, object given

Type: 2
File: chat/lib/class/AJAXChatMySQLQuery.php (Line no. 27)
Message
mysql_error() expects parameter 1 to be resource, object given
++ bump ++
P.S.: and no, the developer did not reply on email or github.
On my site it's still working with 1.8.17.
Your errors look like the database connection type in chat/lib/config.php is set as "mysql". You could try changing it to "mysqli".
Yay! That did it! ♥
OK. Now i switched to PHP7 and i'm getting this error:

Your copy of MyBB running on Linguisten.de (https://www.linguisten.de) has experienced an error. Details of the error include:
---
Type: 2
File: chat/lib/class/AJAXChatTemplate.php (Line no. 55)
Message
preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead

The relevant code line is this:
		$this->_parsedContent = preg_replace($this->_regExpTemplateTags, '$this->replaceTemplateTags(\'$1\', \'$2\')', $this->_parsedContent);


How do I get it to work again, again?
Hi,

it's weird but the /e modifier it's not in the line of code you post. Maybe is in the replaceTemplateTags function?
never mind. i had to upgrade the ajaxchat version entirely - now it works
Hello @ all,

I have upgraded MyBB to 1.8.19. The implemented blueimp ajax chat is running. (server works with php 5)
BUT:
I moved my MyBB to a php-7 compatible server.

If I then want to open the blueimp ajax chat on the new server, I get an error message:

"XML processing error: No root element found.
Address: http://domain/mybb/chat/index.php
Line no. 1, column 1:
^
"
Maybe someone here knows this mistake and can explain to me in detail why it is and what I have to do. 

Maybe I must upgrade the chat to the newest version, but where I can get this newest version?

Many thanks in advance!
Tina
I got it here and it works nicely: https://github.com/Frug/AJAX-Chat
Pages: 1 2