Not sure how long this has been an issue but trying to delete a module and I get:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ee.exp_module_member_groups' doesn't exist:
DELETE FROM `exp_module_member_groups` WHERE `module_id` = 46
ee/legacy/database/drivers/mysqli/mysqli_connection.php:114
Stack Trace: Please include when reporting this error
#0 ee/legacy/database/drivers/mysqli/mysqli_driver.php(112): CI_DB_mysqli_connection->query()
#1 ee/legacy/database/DB_driver.php(260): CI_DB_mysqli_driver->_execute()
#2 ee/legacy/database/DB_driver.php(175): CI_DB_driver->simple_query()
#3 ee/legacy/database/DB_active_rec.php(1616): CI_DB_driver->query()
#4 user/addons/hop_404_reporter/upd.hop_404_reporter.php(114): CI_DB_active_record->delete()
#5 ee/legacy/libraries/addons/Addons_installer.php(89): hop_404_reporter_upd->uninstall()
#6 ee/legacy/libraries/addons/Addons_installer.php(325): Addons_installer->uninstall_module()
#7 ee/legacy/libraries/addons/Addons_installer.php(51): Addons_installer->_update_addon()
#8 ee/ExpressionEngine/Controller/Addons/Addons.php(1277): Addons_installer->uninstall()
#9 ee/ExpressionEngine/Controller/Addons/Addons.php(617): ExpressionEngine\Controller\Addons\Addons->uninstallModule()
#10 [internal function]: ExpressionEngine\Controller\Addons\Addons->remove()
#11 ee/ExpressionEngine/Core/Core.php(251): call_user_func_array()
#12 ee/ExpressionEngine/Core/Core.php(111): ExpressionEngine\Core\Core->runController()
#13 ee/ExpressionEngine/Boot/boot.php(161): ExpressionEngine\Core\Core->run()
#14 admin.php(153): require_once('...')
#14 admin.php(153): require_once('...')
I’ve tried another module with the same errors.
The table referenced does not exist in my database.
@xcl. I assume this is is either an upgraded site that didn’t have the most up-to-date version of those add-ons, or a newer site that tried to use an older version of the add-ons. Either way, these add-ons are referencing the old table names for these tables. In Hop 404 Reporter here, it’s trying to remove any rows that references the module in the exp_module_member_groups
table. However, that table is now called exp_module_member_roles
.
If the add-on still uninstalled, then you can leave as is and just have extra stuff in your DB or you can manually go through that table and find any rows that references that module and manually remove them.
In the future, if you have an older add-on you can search the upd
file for stuff like “*_member_groups” and find/replace everything to the new names of the tables. Then the uninstalls should run a lot smoother.
Thought that may be the case.
I’ve already cleared that and a few other bits out but will no doubt help others who come across it 😊
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.