mChat

Installation error with existing database - mChat

Installation error with existing database

by Eryk0201 » Fri Nov 09, 2018 9:13 pm

Hello,
I'm setting up a new forum which uses a database backup from the time when it was hosted on different site. I want to keep the database, including mchat messages. The old forum used phpbb 3.1.7-pl1, now it's 3.2.3. There are mchat database labels in the database. I moved the files into forum files and when I try to enable it from the customization tab it says:
Image

There were more labels mentioned that it wanted to be deleted. After I delete all of them, it creates new one and shows the same message, just with different number.

What should I do to enable mchat and keep old messages from the database?
Eryk0201
Registered User
Posts: 22
Joined: Sun Nov 04, 2018 11:02 pm
Contact:

Re: Installation error with existing database

by kasimi » Sat Nov 10, 2018 12:20 am

Hi,

what mChat version was installed on your phpBB 3.1.7-pl1 board? If it was mChat before version 2.0.0-RC3 I'm afraid I can't help you because I'm not familiar with the database structure of these older versions.

After deleting the module ID from your database, check the module management in ACP > System if there still are any UCP or ACP mChat modules and delete those too.

Or maybe this helps: https://github.com/kasimi/mChat/issues/4
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3476
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Installation error with existing database

by Eryk0201 » Sun Nov 11, 2018 2:14 pm

kasimi wrote:Hi,

what mChat version was installed on your phpBB 3.1.7-pl1 board? If it was mChat before version 2.0.0-RC3 I'm afraid I can't help you because I'm not familiar with the database structure of these older versions.
I don't know how to check it. Is there a way?
kasimi wrote:After deleting the module ID from your database, check the module management in ACP > System if there still are any UCP or ACP mChat modules and delete those too.
There weren't any.
kasimi wrote:Or maybe this helps: https://github.com/kasimi/mChat/issues/4
I had the exact same messages as this guy, including
Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors.
A required module does not exist: ACP_CAT_MCHAT
Then I deleted ACP_CAT_MCHAT from Extensions tab. There weren't any other mChat modules anywhere. After I try to install it again, I'm just getting the same message as I quoted before.
Eryk0201
Registered User
Posts: 22
Joined: Sun Nov 04, 2018 11:02 pm
Contact:

Re: Installation error with existing database

by kasimi » Sun Nov 11, 2018 2:21 pm

Eryk0201 wrote:I don't know how to check it. Is there a way?
I don't think so.

Are there any .php files with mchat in the name outside of the ext folder?
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3476
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Installation error with existing database

by Eryk0201 » Sun Nov 11, 2018 3:27 pm

kasimi wrote:
Eryk0201 wrote:I don't know how to check it. Is there a way?
I don't think so.

Are there any .php files with mchat in the name outside of the ext folder?
You mean in the files? There aren't any - I created new forum and just used old database backup that has mchat modules/labels/whateverthatis.

In phpMyAdmin there are bucky_mchat_deleted_messages and bucky_mchat_sessions (the old forum used "bucky_" prefix). I'm not sure where, but I could see the messages in phpMyAdmin before and I think it was in bucky_mchat_sessions, but now there's only one row/key and I can't find the messages anywhere. Maybe it's because I deleted all the labels it wanted me to delete or because I deleted ACP_CAT_MCHAT?

I still have the old database backup if that would be important.
Eryk0201
Registered User
Posts: 22
Joined: Sun Nov 04, 2018 11:02 pm
Contact:

Re: Installation error with existing database

by Eryk0201 » Sun Nov 11, 2018 11:14 pm

I tried deleting everything mchat related from the database (bucky_mchat_sessions and bucky_mchat_deleted_messages), just to see if I could install it even without my data. And I'm still getting the same error messages. There must be some mchat elements in other labels.
Eryk0201
Registered User
Posts: 22
Joined: Sun Nov 04, 2018 11:02 pm
Contact:

Re: Installation error with existing database

by kasimi » Mon Nov 12, 2018 10:59 am

What does this query return:

Code: Select all

SELECT *
FROM bucky_modules
WHERE module_langname LIKE '%mchat%'
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3476
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Installation error with existing database

by Eryk0201 » Mon Nov 12, 2018 2:57 pm

kasimi wrote:What does this query return:

Code: Select all

SELECT *
FROM bucky_modules
WHERE module_langname LIKE '%mchat%'
nothing, 0 lines
Eryk0201
Registered User
Posts: 22
Joined: Sun Nov 04, 2018 11:02 pm
Contact:

Re: Installation error with existing database

by kasimi » Mon Nov 12, 2018 5:14 pm

Actually it needs to be uppercase, what does this return:

Code: Select all

SELECT module_basename, module_langname
FROM bucky_modules
WHERE module_langname LIKE '%MCHAT%'
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3476
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Installation error with existing database

by Eryk0201 » Mon Nov 12, 2018 6:24 pm

kasimi wrote:Actually it needs to be uppercase, what does this return:

Code: Select all

SELECT module_basename, module_langname
FROM bucky_modules
WHERE module_langname LIKE '%MCHAT%'
Empty again, 0 lines.
Eryk0201
Registered User
Posts: 22
Joined: Sun Nov 04, 2018 11:02 pm
Contact:

Re: Installation error with existing database

by kasimi » Mon Nov 12, 2018 7:07 pm

And this one:

Code: Select all

SELECT migration_name
FROM bucky_migrations
WHERE migration_name LIKE '%mchat%'
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3476
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Installation error with existing database

by Eryk0201 » Mon Nov 12, 2018 8:22 pm

kasimi wrote:And this one:

Code: Select all

SELECT migration_name
FROM bucky_migrations
WHERE migration_name LIKE '%mchat%'
Image
Eryk0201
Registered User
Posts: 22
Joined: Sun Nov 04, 2018 11:02 pm
Contact:

Re: Installation error with existing database

by kasimi » Mon Nov 12, 2018 8:30 pm

Do you have mChat completely deleted and uninstalled, and not just disabled? If so, delete these two entries from your migrations table.

Next, what about this query:

Code: Select all

SELECT config_name
FROM bucky_config
WHERE config_name LIKE '%mchat%'
If there are results, delete them as well. Now you should be able to enable mChat.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3476
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Installation error with existing database

by Eryk0201 » Mon Nov 12, 2018 10:26 pm

kasimi wrote:Do you have mChat completely deleted and uninstalled, and not just disabled? If so, delete these two entries from your migrations table.

Next, what about this query:

Code: Select all

SELECT config_name
FROM bucky_config
WHERE config_name LIKE '%mchat%'
If there are results, delete them as well. Now you should be able to enable mChat.
Ok thanks, it works. Now how can I recover messages?
Eryk0201
Registered User
Posts: 22
Joined: Sun Nov 04, 2018 11:02 pm
Contact:

Re: Installation error with existing database

by Eryk0201 » Wed Nov 14, 2018 7:48 pm

Ok I did it :D I just removed all tables from the database backup except from mchat ones, imported with phpmyadmin and it just works. Thanks for all!
Eryk0201
Registered User
Posts: 22
Joined: Sun Nov 04, 2018 11:02 pm
Contact: