Chat window not appearing for non-admins!

Hiya.
I installed the Chat plugin on one of my sites, and configured it for registered members only. The bottom corner chat is showing up for me as an admin, but when I login as different subscriber test users, it doesn't show up. I've gone to the "Authentication" area and enabled it for subscriber, but it's still not working.

The subscribers can see and participate in a group chat that's enabled. And as an admin, I can initiate a private chat with a subscriber, and THEN the bottom corner window will show for them. But the Public Chat room bottom corner window that should always be there is not showing for them. Also, when they go to a member profile or members directory, the button for initiating chat with someone doesn't show.

Any help in solving this mystery would be greatly appreciated!!
Thanks.

  • Vinod Dalvi

    Hi Anton,

    Thanks for posting on the forum.

    Would you mind if I logged in to your site and did some troubleshooting? This might help get to the bottom of this faster. If this is ok, just grant me temporary admin access to your site by clicking "Grant Access" button in the WPMU DEV Dashboard Settings as described on the following page and reply on this thread after granting it?

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Kind Regards,
    Vinod Dalvi

  • Vinod Dalvi

    Hi Anton,

    Thank you for granting the support staff access.

    I have tested on your site and i didn't see the bottom corner chat even as an admin user.

    Please advise.

    I have tested it on my test site using latest version of Chat plugin and it worked fine for me as an admin and subscriber user.

    This can be due to plugin/theme conflict on your site.

    You can just try on your development site temporary using default WordPress theme like Twenty Fifteen and temporary deactivating all other plugins as displayed in the following flowchart to know which theme/plugin is conflicting if any.

    https://premium.wpmudev.org/manuals/getting-support/

    Regards,
    Vinod Dalvi

  • Anton

    Um....that's really weird. The bottom corner chat WAS definitely appearing before (as admin). I wrote something in a public room, and had a test conversation with a test user. But now it's disappeared. Not sure what happened.... Could logging in as support have done anything strange?

    Unfortunately this isn't a development site, but a live one -- with regular users logging in. So I can't really deactivate all of my plugins all at once. I'll need to wait for a quieter time to do it one at a time...

    It's just weird that it WAS working before (at least as an admin), but not anymore....

    I will let you know what, if anything, happens.

  • Anton

    Ok - So on a development site, I installed the same theme, installed Chat to the same settings, and then installed every single plugin that was also on the live site (where Chat wasn't working), and....Chat WORKS on the development site!!

    So why doesn't it work on the live site????
    I even tried deleting Chat and re-installing it, and it still doesn't work (although it had same settings as before, so not sure if it was a clean re-install).

    I'm kind of going crazy here, and not sure what's wrong. The development and live sites both have the same theme and plugins, and Chat works in one place and not the other. Do you have any other idea of what it could be? I really want to use Chat on my live site if possible...

    Thanks.

  • Anton

    FYI - While the bottom corner chat has seemingly disappeared, even for my Admin role, the "Available"/"Away" buttons STILL appear on the Members Directory for my admin. I was able to initiate a Private Chat again with my subscriber role, and the chat window showed up for both roles only then.

    Without an admin initiating a chat, however, NOTHING shows up (not the bottom corner chat, or the initiate chat buttons) for subscribers.

    So frustrating....

  • Anton

    I created a page for public chat at the original site, at the following location: "../public-chat-room/"
    Other than some weird alignment issue happening on the bottom, it seems to work fine for all.

    I also enabled access at my testsite.dev development site, but... would you still be able to access even when it's on my local computer? (If not, I can clone it to a live subdomain). Just so you know -- it's NOT an exact replica of the other site that's having problems. It just has the exact same theme and plugins installed -- and the bottom corner chat is working there for all, and the initiate chat buttons are showing for subscribers too and not just admins.

    Let me know if you need anything else from me. I hope this can get figured out and resolved!!

  • Patrick

    Hi there @Anton

    I hope you had a great weekend!

    No, we can't access a site that is on a local development (on your computer).

    However, I just logged into your site via the support access and see the private bottom corner chat window just fine, both on the front-end of your site and in wp-admin. The chat box you set up on /public-chat-room/ also appears for me when logged-in as admin.

    So I created a test user at the subscriber role (pcwriter) and logged-in as that user in another browser. The chat box on /public-chat-room/ is accessible to that test user, but the bottom-corner chat is not visible.

    I can't find anything in your settings for the chat plugin that would prevent the bottom-corner chat from appearing for regular users, and browser console does indicate that it is loading. So there is likely something interfering with the display (but the console doesn't show any errors).

    So if you have your test site set up online, and mirroring your live site, that would help us help you debug further.

    Thanks!

  • Anton

    Sorry, but I'm a bit confused by this answer! :-\
    You say that you want me to make an EXACT copy? Well to me, an exact copy WOULD be a clone (which you say would re-create the same problem). Hence my confusion.

    If you had meant to say for me to make it as close as possible, with all of the settings and such exactly the same, well...that took me literally weeks to do the first time I created the site. I suppose I can get it done within a day this time around if it's really necessary. If I need to do that (and just having duplicate themes and plugins is not enough), let me know. I'm assuming copying CONTENT doesn't matter.

    In the meantime, the development site (where bottom corner chat is STILL working properly) has been moved from my local environment on to a subdomain of another live site. It says support access is still active there....

  • Vinod Dalvi

    Hi Anton,

    You say that you want me to make an EXACT copy? Well to me, an exact copy WOULD be a clone (which you say would re-create the same problem). Hence my confusion.

    Yes the exact copy means the clone/replica of your live site.

    If you had meant to say for me to make it as close as possible, with all of the settings and such exactly the same, well...that took me literally weeks to do the first time I created the site. I suppose I can get it done within a day this time around if it's really necessary. If I need to do that (and just having duplicate themes and plugins is not enough), let me know. I'm assuming copying CONTENT doesn't matter.

    To reproduce the issue along with themes and plugins we have to clone all the settings and content on test site.

    You don't have to do this manually as it will take much time. You can do this easily by using our following Snapshot plugin.

    https://premium.wpmudev.org/project/snapshot/

    Using above Snapshot plugin just create the back up/snapshot of your live site and restore it on your test site by using this Snapshot plugin on both the sites.

    In the meantime, the development site (where bottom corner chat is STILL working properly) has been moved from my local environment on to a subdomain of another live site. It says support access is still active there....

    Is this http://www.testsite.dev your moved development site?

    It's not accessible for me even its front end.

    Please advise.

    Regards,
    Vinod Dalvi

    • Anton

      Yes the exact copy means the clone/replica of your live site.

      To reproduce the issue along with themes and plugins we have to clone all the settings and content on test site.

      But....and this is where my confusion is coming from....staff member Ashok stated above that cloning the site would just recreate the same problem. (Basically, giving us the exact same site where bottom chat still doesn't work). I don't see how that helps you guys find the problem -- isn't it virtually the same site when cloned??

      If this is really REALLY what you want me to do, I'll do it -- even though it doesn't make sense to me. Just say the word.
      In the meantime, I'm trying to get you access to the development site that only has the theme/plugins in common ( but is not an exact clone). Unfortunately, there's a problem...

      Is this http://www.testsite.dev your moved development site?

      It's not accessible for me even its front end.

      No, that was my original development site when it was just on my computer. I think I mistakenly initiated support access there before I moved the site live online, and that's created a problem. I just tried to revoke access there and reinstate it, but now I'm getting an error message saying that there was a problem with granting support access, and to make sure that the site is enabled in the API.
      Sorry about that -- what should I do now?

  • Vinod Dalvi

    Hi Anton,

    But....and this is where my confusion is coming from....staff member Ashok stated above that cloning the site would just recreate the same problem. (Basically, giving us the exact same site where bottom chat still doesn't work). I don't see how that helps you guys find the problem -- isn't it virtually the same site when cloned??

    This is because on your development site if we reproduce the issue by exactly cloning your live site then we troubleshoot & fix the issue by disabling plugin/theme and customizing/editing some code which is not possible to do this on your live site as your live site may temporary go down or our troubleshooting may generate any other unexpected issue which we don't want to.

    I just tried to revoke access there and reinstate it, but now I'm getting an error message saying that there was a problem with granting support access, and to make sure that the site is enabled in the API.
    Sorry about that -- what should I do now?

    Please try deleting and reinstalling the WPMU DEV Dashboard on that site and also log out and log in to the WPMU DEV Dashboard by going to WPMU DEV > Manage and there you will see your API keys. Just beside of your API key, you will see a edit link. Just click on edit link and you will be logged out then log in again.

    Regards,
    Vinod Dalvi

  • Anton

    This is because on your development site if we reproduce the issue by exactly cloning your live site then we troubleshoot & fix the issue by disabling plugin/theme and customizing/editing some code which is not possible to do this on your live site as your live site may temporary go down or our troubleshooting may generate any other unexpected issue which we don't want to.

    Ok....THAT makes sense. I was confused how things were being worded before, as it sounded liked contradicting statements.
    It took a while to figure Snapshots out, but I finally cloned the problem site! And sure enough, the Chat there now has the same problem....

    Please try deleting and reinstalling the WPMU DEV Dashboard on that site and also log out and log in to the WPMU DEV Dashboard by going to WPMU DEV > Manage and there you will see your API keys. Just beside of your API key, you will see a edit link. Just click on edit link and you will be logged out then log in again.

    I followed the instructions, so the new support access should be there for the test site. Please let me know if there's anything more you guys need from me!

    Do whatever is needed to the test site to find out what's making Chat not work properly there. I look forward to what you guys discover -- and hope that it's fixable!!!
    THANKS!

  • Vinod Dalvi

    Hi Anton,

    Thank you for cooperating us and cloning your live site to dev site.

    Unfortunately the support staff access is not working for us on your dev site so could you please just send log in info of your dev site through our secured contact form: https://premium.wpmudev.org/contact/
    - Choose "I have a different question"
    - Include my name in the subject "Vinod Dalvi"
    - Include the URL of this post in your message so that I may track this issue better
    - Include login information (Wordpress admin info username + password )

    Regards,
    Vinod Dalvi

  • Anton

    I just wanted to throw some other thoughts out there (as I'm obsessing about this), in case they might help...

    The Chat plugin DID work fine in the theme that I had (WPLMS) on another installation, so the theme shouldn't be the problem, I don't think...

    I DID have another chat-like plugin (iFlyChat) installed before this. It had been deactivated when Chat was installed (and has since been deleted completely) -- BUT -- could the settings from that still be around somehow and messing up Chat?

    And since the Getting Support link you guys previously gave me mentioned that if themes or plugins aren't the problem, that maybe it's something with the htaccess or config files, I thought I should also mention this:
    I did recently try to see if I can turn the site into a multisite (something I hadn't tried before). I only managed to alter the config file, and never got to the part where I would switch the network on, because that would have required disabling all plugins first, which I didn't want to do. I removed the line about multisite from the config file, but...I have wondered ever since if my brief attempt might have messed anything up?

    Not sure if any of the above helps with figuring out what the problem may be....

  • Patrick

    Hi again @Anton

    I hope you're having a great day!

    I found the email you sent to @Vinod Dalvi and logged into your dev site to see if I can help figure this out with you.

    Even after deactivating all plugins and enabling a default theme, the darned bottom-corner chat window simply does not appear at all, anywhere.

    Can you please post the contents of your htaccess & wp-config.php files? Or, if you're concerned about security, can you please email us FTP access credentials for the dev site so we can logon and see the files ourselves?

    Thanks!

  • Anton

    Since this topic has gotten overly long, and multiple people have become involved now, I wanted to sum up the issue I'm having as succinctly as possible:

    * The CHAT plugin WAS working properly for me when I first installed it -- at least as an admin. Admins could see bottom corner chat and chat buttons next to user names as normal.
    * I only discovered a problem when logged in as a non-admin: The "Bottom Corner Chat" would not appear, nor would any of the Chat buttons next to users for initializing a chat. I could still receive a private chat from an admin, though, and the chat window would continue to appear until I left a chat.
    * Shortly after I first granted support access, the bottom corner chat suddenly disappeared for admins too. There were no changes made other than granting support access at that time, so I'm curious if that potentially had something to do with it.
    * Disabling plugins and switching to a default themed doesn't seem to do anything -- Chat still won't work.

  • Vinod Dalvi

    Hi @Anton,

    Thank you for sending the FTP details.

    I have troubleshooted the issue and found it's happening because in the blocked site URLs list your site URL is getting added.

    I could resolve the issue on your test site by activating the small developed "Quick Custom Solution Plugin" which contains the following code.

    // Hook in
    add_filter( 'wpmudev-chat-blocked-site-urls' , 'custom_wpmudev_chat_blocked_site_urls' );
    
    function custom_wpmudev_chat_blocked_site_urls( $blocked_urls ) {
    	if( !empty($blocked_urls) ){
    		foreach ($blocked_urls as $key => $blocked_url) {
    			if (strpos($blocked_url,'gayleague.com') !== false) {
    				unset($blocked_urls[$key]);
    			}
    		}
    	}
         return $blocked_urls;
    }

    Please check it and let me know how it works for you. Also test it on your live site.

    Best Regards,
    Vinod Dalvi

  • Anton

    OMG - That's genius!! THANK YOU!!!

    Bottom corner chat is definitely appearing again for all user types!!!! :slight_smile:

    There's only one major problem that still remains....
    For non-admins, they still can't see the chat buttons ("Away," "Available,") that appear next to usernames in the members directory or profiles.
    All user roles are "authenticated" to use Chat, so....what else can be going on here?

    Being able to initiate a private chat with someone else is the most important element of this plugin, so we really need that to work. Any suggestions would be greatly appreciated!!

    (I created the "TestUser2" subscriber with the same password as the WPMUDEV admin one so you can see).

  • Vinod Dalvi

    Hi @Anton,

    Bottom corner chat is definitely appearing again for all user types!!!! :slight_smile:

    That's great news! Glad it's working fine for you now :slight_smile:

    There's only one major problem that still remains....
    For non-admins, they still can't see the chat buttons ("Away," "Available,":wink: that appear next to usernames in the members directory or profiles.
    All user roles are "authenticated" to use Chat, so....what else can be going on here?

    This is how it works by default but you can make it to work for non admin users also by using the plugin solution provided in the following reply.

    https://premium.wpmudev.org/forums/topic/wp_mu-chat-availibility-only-displays-for-admin-users?view=all#post-879271

    Please note you are already running the provided Quick Custom Solution Plugin on your site so please merge the code from these two plugins in to one or just delete the Quick Custom Solution Plugin from your site and use the plugin attached to this reply which contains the merged code from the two plugins.

    Where is this blocked sites list, and how do you suppose my site got on there??

    You will find the blocked sites list/URL on the following path as displayed in the attached screenshot.

    Admin Area -> Chat -> Settings Common -> Blocked URLs

    I am not sure why your site goes there and blocked even it's removed from the Blocked URLs list but we could manage to make it work using the provided custom solution.

    Thanks,
    Vinod Dalvi

  • Anton

    Thanks so much for returning to this thread to help me out, @Vinod!!! :slight_smile:

    This is how it works by default...

    Wow, really?
    From the plugin's description, it would seem like initiating Chat should be meant for ALL users, not just admins.... (Yeah, I know there's a widget for friend chat, but that shouldn't be the only way to start a chat).

    ...but you can make it to work for non admin users also by using the plugin solution provided in the following reply.

    Fantastic!!!
    Now it all works the way I was hoping it would.
    THANK YOU!!! :slight_smile:

    The only remaining quirk is that when I (as an admin) go to a single user's profile page now, the initiate chat buttons appear twice. Since only a couple of people are admins, it's not a big deal. Just thought I'd point it out, though...

    Glad you were able to help out.
    Thanks again!

  • Vinod Dalvi

    Hi @Anton,

    From the plugin's description, it would seem like initiating Chat should be meant for ALL users, not just admins.... (Yeah, I know there's a widget for friend chat, but that shouldn't be the only way to start a chat).

    Users can also initiate private in-corner chats with their online friends via the toolbar. This requires either BuddyPress or the WPMU DEV Friends plugin.

    Plus, if you have BuddyPress active on your site, users can initiate private chats with their friends directly from the friends list in their BuddyPress profile.

    The only remaining quirk is that when I (as an admin) go to a single user's profile page now, the initiate chat buttons appear twice. Since only a couple of people are admins, it's not a big deal. Just thought I'd point it out, though...

    You can remove the duplicate button by adding the following CSS code in the style.css file of your child theme or add it in your site using the following plugin.

    https://wordpress.org/plugins/simple-custom-css/

    body.xprofile.bp-user #item-buttons .wpmudev-chat-now-button:nth-child(5) {
    display: none;
    }

    Cheers,
    Vinod Dalvi

  • Anton

    Users can also initiate private in-corner chats with their online friends via the toolbar.

    I have the toolbar disabled for non-admins, so I wasn't aware.

    Plus, if you have BuddyPress active on your site, users can initiate private chats with their friends directly from the friends list in their BuddyPress profile.

    Gotcha. I hadn't thought to look at the Friends list. But since my site is designed for people to initiate chats with ANYONE (not just friends), it was important to have the chat buttons in the Members directory as well.

    You can remove the duplicate button by adding the following CSS code

    Brilliant -- that worked beautifully.
    Thanks again!!!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.