mChat

mChat installation errors - mChat

mChat installation errors

by bertybassett » Mon Mar 18, 2019 12:35 pm

I installed ver 2.1.1 on my almost fresh installation of 3.2.4 of the forum and it fails to enable

Information
The installation has been aborted.
There are remnant modules from the mChat MOD for phpBB 3.0.x in the database. The mChat extension does not work correctly with these modules present.
You need to entirely uninstall the mChat MOD before being able to install the mChat extension. Specifically, the modules with the following IDs need to be deleted from the phpbb_modules table: 215


If I try to delete data I get?

Catchable fatal error: Argument 1 passed to phpbb\db\migrator::get_callable_from_step() must be of the type array, null given, called in /volume1/web/phpbb/phpbb/db/migrator.php on line 704 and defined in /volume1/web/phpbb/phpbb/db/migrator.php on line 726

nothing in error logs.

Any thoughts
bertybassett
Registered User
Posts: 5
Joined: Mon Mar 18, 2019 12:28 pm
Contact:

Re: mChat installation errors

by kasimi » Mon Mar 18, 2019 4:10 pm

Is that all of the error message or is there more?

Go to ACP, System, ACP Module Management, Extensions. Do you see mChat anywhere? If so, try deleting it.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3655
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: mChat installation errors

by bertybassett » Mon Mar 18, 2019 4:55 pm

Removed mchat from “Go to ACP, System, ACP Module Management”

Still same can’t delete data or enable.
bertybassett
Registered User
Posts: 5
Joined: Mon Mar 18, 2019 12:28 pm
Contact:

Re: mChat installation errors

by kasimi » Mon Mar 18, 2019 5:04 pm

Open ext/dmzx/mchat/ext.php, find $config = $this->container->get('config'); and on a new line above, add return true;

Now enable again. Do you still see any errors?

By the way, the latest mChat is 2.1.2.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3655
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: mChat installation errors

by bertybassett » Mon Mar 18, 2019 6:14 pm

Double post sorry
Last edited by bertybassett on Mon Mar 18, 2019 6:16 pm
bertybassett
Registered User
Posts: 5
Joined: Mon Mar 18, 2019 12:28 pm
Contact:

Re: mChat installation errors

by bertybassett » Mon Mar 18, 2019 6:16 pm

kasimi wrote:Open ext/dmzx/mchat/ext.php, find $config = $this->container->get('config'); and on a new line above, add return true;

Now enable again. Do you still see any errors?

By the way, the latest mChat is 2.1.2.
You sir are a legend, that enabled me to delete it and then re-enable it.
bertybassett
Registered User
Posts: 5
Joined: Mon Mar 18, 2019 12:28 pm
Contact:

Re: mChat installation errors

by ivailo95 » Sun Mar 24, 2019 3:06 pm

kasimi wrote:Open ext/dmzx/mchat/ext.php, find $config = $this->container->get('config'); and on a new line above, add return true;

Now enable again. Do you still see any errors?

By the way, the latest mChat is 2.1.2.
i did the changes u said in previus post but still see the error

Here is the file and see what's wrong

Code: Select all

<?php

/**
 *
 * @package phpBB Extension - mChat
 * @copyright (c) 2016 dmzx - http://www.dmzx-web.net
 * @copyright (c) 2016 kasimi - https://kasimi.net
 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
 *
 */

namespace dmzx\mchat;

use phpbb\extension\base;

class ext extends base
{
	/**
	 * Requires phpBB 3.1.7-PL1 due to usage of \phpbb\session:update_session_infos()
	 * Requires phpBB 3.1.8-RC1 due to HTTPS in version check
	 * Requires phpBB 3.2.0 due to EoL of phpBB 3.1
	 *
	 * @return bool
	 * @access public
	 */
	public function is_enableable()
	{
		$config = $this->container->get('config');
		return true;

		// Here we check if any modules from the mChat MOD for phpBB 3.0.x are still in the database.
		// This is_enableable() method is called multiple times during the installation but we only
		// need to do the following check once. Checking for the absence of the mchat_version value
		// in the config guarantees that we're in the very first step of the installation process.
		// Any later call of this method doesn't need to check this again and in fact will wrongly
		// detect the extension's modules as being remnants.
		if (empty($config['mchat_version']))
		{
			$table_prefix = $this->container->getParameter('core.table_prefix');
			$module_ids = $this->get_old_module_ids($table_prefix);

			if ($module_ids)
			{
				$lang = $this->container->get('language');
				$lang->add_lang('mchat_acp', 'dmzx/mchat');
				$php_ext = $this->container->getParameter('core.php_ext');
				$error_msg = $lang->lang('MCHAT_30X_REMNANTS', $table_prefix, implode($lang->lang('COMMA_SEPARATOR'), $module_ids)) . adm_back_link(append_sid('index.' . $php_ext, ['i' => 'acp_extensions', 'mode' => 'main']));

				trigger_error($error_msg, E_USER_WARNING);
			}
		}

		return phpbb_version_compare(PHPBB_VERSION, '3.2.0', '>=') && phpbb_version_compare(PHP_VERSION, '5.4.7', '>=');
	}

	/**
	 * This method checks whether the phpbb_modules table contains remnants of the 3.0 MOD.
	 * It returns an array of the modules' IDs, or an empty array if no old modules are found.
	 *
	 * @param string $table_prefix
	 * @return array
	 */
	protected function get_old_module_ids($table_prefix)
	{
		$db = $this->container->get('dbal.conn');

		$mchat_30x_module_langnames = [
			'ACP_CAT_MCHAT',
			'ACP_MCHAT_CONFIG',
			'ACP_USER_MCHAT',
			'UCP_CAT_MCHAT',
			'UCP_MCHAT_CONFIG',
		];

		$sql = 'SELECT module_id
			FROM ' . $table_prefix . 'modules
			WHERE ' . $db->sql_in_set('module_langname', $mchat_30x_module_langnames);
		$result = $db->sql_query($sql);
		$rows = $db->sql_fetchrowset($result);
		$db->sql_freeresult($result);

		$module_ids = [];

		foreach ($rows as $row)
		{
			$module_ids[] = $row['module_id'];
		}

		return $module_ids;
	}
}
here is the vers. info
https://i.imgur.com/2Q7QhRl.png
Attachments
Screenshot 2019-03-24 16.59.48.png
before that
Screenshot 2019-03-24 17.05.36.png
after i did the changes
ivailo95
Registered User
Posts: 628
Joined: Tue Sep 05, 2017 8:00 am
Location: Bulgaria
Name: Ivailo
Contact:

Re: mChat installation errors

by kasimi » Tue Mar 26, 2019 11:22 am

Can you delete data without errors? If not, delete all modules in the Module management. Then use phpMyAdmin or similar to delete all remaining rows in the phpbb_modules and phpbb_migrations tables that have mchat or MCHAT in their name. Now try to delete data again.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3655
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: mChat installation errors

by ivailo95 » Tue Mar 26, 2019 12:44 pm

kasimi wrote:Can you delete data without errors? If not, delete all modules in the Module management. Then use phpMyAdmin or similar to delete all remaining rows in the phpbb_modules and phpbb_migrations tables that have mchat or MCHAT in their name. Now try to delete data again.
Nope,when try to delete data it brokes the board and need to click BACK button to fix it
when try to delete mchat thro the upload ext i see this errpr
The update process errored. 500 - Internal Server Error
Attachments
Screenshot 2019-03-26 14.48.53.png
Screenshot 2019-03-26 14.49.33.png
Screenshot 2019-03-26 14.49.54.png
ivailo95
Registered User
Posts: 628
Joined: Tue Sep 05, 2017 8:00 am
Location: Bulgaria
Name: Ivailo
Contact:

Re: mChat installation errors

by kasimi » Tue Mar 26, 2019 12:53 pm

Unfortunately I can't provide support if Upload Extensions was used to install/uninstall mChat because I'm not familiar with it.

To avoid these kinds of problems, you should always upload and install extensions manually.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3655
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: mChat installation errors

by ivailo95 » Tue Mar 26, 2019 12:56 pm

kasimi wrote:Unfortunately I can't provide support if Upload Extensions was used to install/uninstall mChat because I'm not familiar with it.

To avoid these kinds of problems, you should always upload and install extensions manually.
i will try to instal mchat thro my ftp filezilla then and try again to install it
ivailo95
Registered User
Posts: 628
Joined: Tue Sep 05, 2017 8:00 am
Location: Bulgaria
Name: Ivailo
Contact:

Re: mChat installation errors

by ivailo95 » Tue Mar 26, 2019 9:19 pm

kasimi wrote:Unfortunately I can't provide support if Upload Extensions was used to install/uninstall mChat because I'm not familiar with it.

To avoid these kinds of problems, you should always upload and install extensions manually.
hi again
i remove Upload Extensions and upload mchat thro the ftp and it's the same problem as before

this is my test board

in this board mchat work good
idk what missing in my test board
ivailo95
Registered User
Posts: 628
Joined: Tue Sep 05, 2017 8:00 am
Location: Bulgaria
Name: Ivailo
Contact:

Re: mChat installation errors

by kasimi » Wed Mar 27, 2019 11:09 am

Your database is in an inconsistent state, probably because you used Upload Extensions. From a distance it's impossible to say what's wrong. It looks like your test board is a very basic installation. I'd recommend reinstalling it to have a fresh start, and you will see that mChat will install fine when uploaded manually.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3655
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: mChat installation errors

by ivailo95 » Wed Mar 27, 2019 1:43 pm

kasimi wrote:Your database is in an inconsistent state, probably because you used Upload Extensions. From a distance it's impossible to say what's wrong. It looks like your test board is a very basic installation. I'd recommend reinstalling it to have a fresh start, and you will see that mChat will install fine when uploaded manually.
i think delete mchat from phpmyadmin
but the problem is still here..
Attachments
Screenshot 2019-03-27 15.40.11.png
ivailo95
Registered User
Posts: 628
Joined: Tue Sep 05, 2017 8:00 am
Location: Bulgaria
Name: Ivailo
Contact:

Re: mChat installation errors

by kasimi » Wed Mar 27, 2019 2:37 pm

Did you do this?
kasimi wrote:Then use phpMyAdmin or similar to delete all remaining rows in the phpbb_modules and phpbb_migrations tables that have mchat or MCHAT in their name.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3655
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact: