Topic on Extension talk:MediaWikiChat

Jump to navigation Jump to search

[RESOLVED] Uncaught TypeError: Cannot read property 'users' of undefined

5
Donkey Kong Genius (talkcontribs)

This may not be a new issue but may be related to the cu_away_new.sql comments.

I installed correctly, putting the extension folder in with the extensions and added the following to my LocalSettings.php:

require_once "$IP/extensions/MediaWikiChat/MediaWikiChat.php"; $wgChatKicks = true; $wgChatSocialAvatars = true; $wgChatRichMessages = true; $wgChatUseStyleAttribute = true; $wgChatSidebarPortlet = true; $wgChatLinkUsernames = false; $wgChatMeCommand = false; $wgChatMaxMessageLength = 1000;

When you visit Special:chat you will see that it does not show any users or my text.

In Chrome, in the console I see this:

Uncaught TypeError: Cannot read property 'users' of undefined.

My cu_away_new.sql file reads:

ALTER TABLE /*_*/chat_users MODIFY cu_away binary(12)

It appears that a javascript is running and that it is unable to identity the property 'users' so it just errors over and over as the script runs.

Are there any extensions I should have that are needed for this to work or is there a way to start over and install it correctly? I started off with the update.php but there was an error associated with the cu_away_new.sql. I changed this file to incorporate the new text and then ran it again and the error during update.php did not occur this time but the results were the same.

Donkey Kong Genius (talkcontribs)

I changed $wgChatSocialAvatars = false; and this allowed it to recognize me and show the text in the chat display. Is this because I do not have the SocialProfile extension?

Donkey Kong Genius (talkcontribs)

Once I installed the SocialProfile extension, changed $wgChatSocialAvatars = true, then it all works as normal.

I suggest that instead of stating "Enabled by default" for this item that it is disabled by default since it only works if the SocialProfile extension is installed, otherwise the chat display does not work.

UltrasonicNXT (talkcontribs)

I've made this more clear in the docs, but instead of disabling it by default, I'm going to try and get the software to detect whether SocialProfile is installed, and do it automatically with no config var.

UltrasonicNXT (talkcontribs)

Ok, I've done this so there's no config variable and it'll be done automatically.