Page 1 of 1

Can no longer leave rooms

Posted: 09 Feb 2019, 15:49
by Bgagger
I probably did something to mess this up, I'm guessing it might be a permissions setting somewhere that is blocking this?

But the 'leave room' icon that used to be next to room names is no longer there. The one circled in the image below. The icon next to it I'm not sure what it does, but I'm fairly certain I've never seen it appear in our installation. In any case, I'm more concerned about why we can't leave rooms.


The problem appears to have started while we where still on 2.1.1 mChat and 1.2.5 mChat rooms. We have now updated to 2.1.2 mChat and 1.2.6 mChat rooms.

We are using the following addons:
mChat Archive Search Addon 1.1.2
mChat Icons Menu Addon 1.2.0
mChat Infinite Scroll Addon 1.1.0
mChat Online Banners Addon 1.1.2
mChat Roll Dice 1.0.1
mChat Rooms Addon 1.2.6
mChat Rooms Toggle 1.0.1
mChat User Time Addon 1.0.1
But as far as I can tell none of them is interfering with this. I suspected 'Roll Dice' for a while, which is made by dmzx/martin but disabling it does nothing. Neither does Rooms Toggle.

Any help is appreciated.

Re: Can no longer leave rooms

Posted: 09 Feb 2019, 16:59
by Bgagger
This problem is growing weirder...

Now when we click on a room name twice, my username appears several times in a row in the list of users 'in the room'. And nobody else's name.
The mchat_rooms_sessions table in the database does have several different session_user_id in it.
I have tried clearing phpbbs cache and sessions.
The number of names does seem to match the number of users currently in the room. but they all have the same name.

Re: Can no longer leave rooms

Posted: 09 Feb 2019, 20:35
by Bgagger
whelp, now I'm really in trouble.
I have tried everything to figure out the above problem and figure I messed something up along the way.
With no other options left. I decided to start over from scratch and re-install mchat.
So I disabled rooms, and deleted it's data. Then disabled mChat and when I deleted it's data as well, something went wrong... I got a blank screen. Nothing recorded in the php log. I can return to the extensions screen, but then the delete data option for mChat is still there.
If I enable mChat again, it's not working, it's settings won't appear in the back-end. It appears to have been partially deleted. And if I try to delete the data again, I get a blank screen. No errors.

So I can't remove mChat and I can't get it to work again either. With no clue as to where in the delete data script it's stuck.
Removing the mChat files from the server makes no difference. phpBB still thinks it's installed, only missing files.
Purging caches does nothing.

So I'm stuck. Is there any way I can uninstall mChat to start over? Can I get phpBB to forget it's installed and thus run the install script fresh? Do i need to remove something from the database?

If anyone can help, we would really appreciate it.

Added in 35 minutes 27 seconds:
Turns out I had to delete data for ALL mChat extra addons, before the mChat extension proper would uninstall correctly.
Now I have a lot of re-configuring to do, but hopefully we're able to get back on track.
Then it's time to make extra backups...

Re: Can no longer leave rooms

Posted: 09 Feb 2019, 21:13
by kasimi
What happens when you leave mChat enabled? You don't see any modules (both ACP and UCP?) but do you see any errors or white pages?

Edit: Okay, glad you found a way out. It seems there's still a bug somewhere that causes inconsistencies in the database when disabling mChat or Rooms, or both. :?

Re: Can no longer leave rooms

Posted: 09 Feb 2019, 22:05
by Bgagger
I have now managed to re-install and reconfigure everything to be back pretty much where we started out.
The leave room icon now appears correctly again. I still have no idea when or how it stopped working. But it seems it's not a problem anymore

However the bug where all names of users in a room (the list that pops up when you click a room name a second time) are my name remains.


It's consistent for all users and I can't figure out how it's possible. I've purged the database, uninstalled and re-installed all mChat extensions.
Purged the phpBB cache and sessions. There should reasonably not be any corruption in the database.
It's not as serious a bug, the chat is still usable but if you can find any clue of what might be going on, please let me know. I'll provide any information I can that might be relevant.
It has worked fine before.

I think I can see now how all the extra addons might make mChats delete script trip and fail. There are bound to be a web of dependencies between them.
But perhaps make it a general recommendation to delete all data from extra extensions, before deleting the main mChat extension. Just so there doesn't occur problems with uninstalling mChat.

Added in 31 minutes 11 seconds:
I have an update that might be a clue. It looks like the name that is repeated is whoever created the room.
When another user creates a room and other's join it, it shows the correct number of people, but the name is the room creator over and over.

Re: Can no longer leave rooms

Posted: 10 Feb 2019, 09:38
by kasimi
Excellent detective work! See if this fixes it:
  • Open ext/kasimi/mchatrooms/core/rooms.php
  • Find

    Code: Select all

    - This code is only accessible to donors -
  • Replace with

    Code: Select all

    - This code is only accessible to donors -

Re: Can no longer leave rooms

Posted: 10 Feb 2019, 13:02
by Bgagger
That patch fixes it!
Now the names all display correctly. Thank you once again :)

Re: Can no longer leave rooms

Posted: 24 Feb 2019, 12:09
by Bgagger
The original problem has returned, but only in a very specific way. It may have been the cause of the original issue though, but that can't be confirmed at this point.

When a user activates the 'Join all public rooms automatically:' setting, then they can never leave any rooms. Including private rooms, not even private rooms created by others.

It's not a critical error, since the setting can be deactivated and rooms then work normally.
But it could become a more serious issue if private rooms are not purged because of this, and keeps piling up.

Re: Can no longer leave rooms

Posted: 24 Feb 2019, 14:18
by kasimi
Fixed in version 1.2.8. :+1: