croxton / Mustash

Mustash is an ExpressionEngine control panel module for managing cached Stash variables, bundles and cache-breaking rules.
GNU General Public License v3.0
1 stars 3 forks source link

Mustash is making a call to `exp_member_groups` database table, which is non-existent in ExpressionEngine 6 #16

Closed haydentech closed 4 months ago

haydentech commented 1 year ago

Got this exception in EE 6.4.3:

Mustash is making a call to exp_member_groups database table, which is non-existent in ExpressionEngine 6. If you are site owner, try upgrading Mustash to latest available version. If you are the add-on developer, update your Stash_member_model_pi class to use Role model.

ee/legacy/database/DB_active_rec.php:1705 Stack Trace: Please include when reporting this error

#0 system\ee\legacy\database\DB_active_rec.php(263): CI_DB_active_record->_track_aliases('member_groups')
#1 system\user\addons\mustash\plugins\stash_member_model_pi.php(201): CI_DB_active_record->from('member_groups')
#2 system\user\addons\mustash\plugins\stash_member_model_pi.php(160): Stash_member_model_pi->_get_member_group_title(1)
#3 system\user\addons\mustash\plugins\stash_member_model_pi.php(119): Stash_member_model_pi->_prep_markers(Array)
#4 [internal function]: Stash_member_model_pi->after_member_update(Object(ExpressionEngine\Model\Member\Member), Array, Array)
#5 system\user\addons\mustash\ext.mustash.php(111): ReflectionMethod->invokeArgs(Object(Stash_member_model_pi), Array)
#6 system\ee\legacy\libraries\Extensions.php(203): Mustash_ext->__call('member_model:af...', Array)
#7 system\ee\legacy\libraries\Extensions.php(108): EE_Extensions->call_class('Mustash_ext', 'after_member_up...', Array, Array)
#8 [internal function]: EE_Extensions->call('after_member_up...', Object(ExpressionEngine\Model\Member\Member), Array, Array)
#9 system\ee\ExpressionEngine\Service\Model\Model.php(664): call_user_func_array(Array, Array)
#10 [internal function]: ExpressionEngine\Service\Model\Model->ExpressionEngine\Service\Model\{closure}('after_member_up...', Object(ExpressionEngine\Model\Member\Member), Array, Array)
#11 system\ee\ExpressionEngine\Service\Model\Model.php(610): call_user_func_array(Object(Closure), Array)
#12 [internal function]: ExpressionEngine\Service\Model\Model->ExpressionEngine\Service\Model\{closure}(Array)
#13 system\ee\ExpressionEngine\Service\Event\Emitter.php(132): call_user_func_array(Object(Closure), Array)
#14 [internal function]: ExpressionEngine\Service\Event\Emitter->emit('afterUpdate', Array)
#15 system\ee\ExpressionEngine\Library\Data\Entity.php(637): call_user_func_array(Array, Array)
#16 [internal function]: ExpressionEngine\Library\Data\Entity->emit('afterUpdate', Array)
#17 system\ee\ExpressionEngine\Service\Model\Model.php(843): call_user_func_array('parent::emit', Array)
#18 system\ee\ExpressionEngine\Service\Model\Query\Update.php(50): ExpressionEngine\Service\Model\Model->emit('afterUpdate', Array)
#19 system\ee\ExpressionEngine\Service\Model\DataStore.php(275): ExpressionEngine\Service\Model\Query\Update->run()
#20 system\ee\ExpressionEngine\Service\Model\DataStore.php(240): ExpressionEngine\Service\Model\DataStore->runQuery('Update', Object(ExpressionEngine\Service\Model\Query\Builder))
#21 system\ee\ExpressionEngine\Service\Model\Query\Builder.php(71): ExpressionEngine\Service\Model\DataStore->updateQuery(Object(ExpressionEngine\Service\Model\Query\Builder))
#22 system\ee\ExpressionEngine\Service\Model\Model.php(370): ExpressionEngine\Service\Model\Query\Builder->update()
#23 system\ee\ExpressionEngine\Model\Content\ContentModel.php(219): ExpressionEngine\Service\Model\Model->save()
#24 system\ee\ExpressionEngine\Controller\Members\Profile\Auth.php(75): ExpressionEngine\Model\Content\ContentModel->save()
#25 [internal function]: ExpressionEngine\Controller\Members\Profile\Auth->index()
#26 system\ee\ExpressionEngine\Core\Core.php(266): call_user_func_array(Array, Array)
#27 system\ee\ExpressionEngine\Core\Core.php(122): ExpressionEngine\Core\Core->runController(Array)
#28 system\ee\ExpressionEngine\Boot\boot.php(161): ExpressionEngine\Core\Core->run(Object(ExpressionEngine\Core\Request))
#29 admin.php(144): require_once('C:\\intranet_ee\\...')
#29 admin.php(144): require_once('C:\\intranet_ee\\...')
croxton commented 1 year ago

Mustash hasn't shipped with the members plug-in since v1 (for EE2). Sounds like you need to upgrade to the latest release and recreate your cache breaking rules. This applies: https://github.com/croxton/Stash/wiki/Installing-Mustash#upgrading-from-mustash-1x-ee2-to-mustash-2x-ee3

haydentech commented 1 year ago

That's odd because we've been on Mustash 2.0.2 and EE3.3 for years. I only saw this error after upgrading to EE6.4.3 and Mustash 3.

croxton commented 1 year ago

The plugin file referenced in your stack trace above is not in the 3.0.1 release. It's either an old file that got left in the plugin folder or maybe you downloaded an old release?

https://github.com/croxton/Mustash/tree/master/system/user/addons/mustash/plugins

haydentech commented 1 year ago

Not sure how that all came to be, but I've reloaded a fresh version of the plugin and am back in business. Thanks for the prompt reply!