Chat messages are not delivered - dont even seem to reach DB

Hej,
I have just installed your chat plugin and while I can see both group-chat-windows and privat-chat-windows, including the avatars of the users, no messages are being delivered. I can type and send a message but it does not show up anywhere - I also checked the respective tables in the DB and this is what I found:
- wp_wpmudev_chat_users: entries for the chats are stored
- wp_wpmudev_chat_message: no entries
- wp_wpmudev_chat_log: no entries

I can see the ajax request being fired and I do not get any errors displayed...

I have the lastest release versions of WP (3.5.2), BuddyPress (1.7) and Chat (2.0.4) installed. Thank you for helping me out - I am excited to get this plugin working!!

  • Paul
    • The Green Incsub

    @Michael,

    Wanted to jump in here. I looked at your site and I do see the bottom corner chat. I show up in the user list on the right side of the box. So I know at least the users table is getting populated.

    I tried entering a chat message and as you are aware nothing is coming through. Hmm. Anything special about your setup?

    Try this. On the Chat > Settings Common then the Poll Intervals tab there is a setting 'Chat Session Polling Content' which controls how Chat polls for messages. The two options are:

    Plugins AJAX (default): By default it calls a custom AJAX files within the plugin's own folder. This bypass is to try and be more efficient and not load the WP environment overhead when using the WP ajax.

    WordPress AJAX: This is the traditional AJAX used for 99% of WordPress.

    Try switching to WordPress AJAX. Then reload the page on the front-end

  • Michael
    • Flash Drive

    Hej @Paul,

    I did try this prior to contacting you guys - since I have read this as a possible solution to simular issues ... I also tried to decrease the refresh rate to 4 - to no avail...

    About the setup: it is our test environment and its very basic - no traffic, default 2012 theme, not a lot of data... but since the plugin is not working I guess there must be something special :wink:

    Anything else you guys want me to check or change!? Thanks for helping us out!

    Michael

  • Paul
    • The Green Incsub

    @Michael,

    Hmm. strange indeed. As you mentioned I don't see any errors in the AJAX so at this point I'm not sure. Without access to the backend this is difficult to determine. Would need to trace the AJAX processing and see where messages are being dropped.

  • Paul
    • The Green Incsub

    @Michael,

    login info received. After looking at the code and adding some debug output I was able to determine the issue. The SQL statement which inserts the chat message to the Database appears to be dying with an error.

    Field 'log_id' doesn't have a default value

    As part of the SQL statement we don't set the 'log_id' field since that is used during the archiving processing. But for some reason on your setup this is enough to prevent the record from being inserted into the DB table.

    I've tried to reproduce on 4 other dev sites of my own and cannot reproduce the issue. All I can do for now is to clean up the SQL code to include the default value for the log_id column. Will include this fix on the next update.

    Going to check some of the other queries to see if there are similar errors.

  • Paul
    • The Green Incsub

    @Michael,

    I've gone over the queries and all is now good. I even tested with a second browser as an anonymous user and was able to initiate a private chat. Again, thanks for brining this to our attention and for letting me figure out the issue on your system. The changes will be included in the next release of Chat.

    Please review and let us know if you find any other issues.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.