I'm trying to remove some modules (all Amasty modules) from my site for debugging purposes, but no matter what I do, Magento keeps looking for the Amasty_Base module and I can't get rid of it.
The modules were initially installed via Composer. So first I removed the modules from composer.json
and ran composer update
which duly removed them. Then I ran bin/magento setup:upgrade
and cleared all caches as usual.
I also removed all mention of the modules from the core_config_data
and setup_module
database tables, and for good measure I deleted all the usual Magento cache and generated code directories and cleared Redis cache.
However, when loading my site I get the following exception which shows that Magento is still looking for a amasty/base/etc/module.xml
file:
Exception #0 (Magento\Framework\Exception\FileSystemException): The contents from the "/var/www/vhosts/example.com/httpdocs/vendor/amasty/base/etc/module.xml" file can't be read. Warning!file_get_contents(/var/www/vhosts/example.com/httpdocs/vendor/amasty/base/etc/module.xml): failed to open stream: No such file or directory
<pre>#1 Magento\Framework\Filesystem\Driver\File\Interceptor->fileGetContents('/var/www/vhosts/...') called at [vendor/magento/framework/Module/ModuleList/Loader.php:120]
#2 Magento\Framework\Module\ModuleList\Loader->getModuleConfigs() called at [vendor/magento/framework/Module/ModuleList/Loader.php:81]
#3 Magento\Framework\Module\ModuleList\Loader->load() called at [vendor/magento/framework/Module/ModuleList.php:72]
#4 Magento\Framework\Module\ModuleList->getAll() called at [vendor/magento/framework/Module/ModuleList.php:92]
#5 Magento\Framework\Module\ModuleList->getOne('CoolPartner_Integrat...') called at [vendor/CoolPartner/magento2-integration/src/Integration/Helper/Data.php:36]
#6 CoolPartner\Integration\Helper\Data->getExtensionVersion() called at [vendor/CoolPartner/magento2-integration/src/Integration/Model/SDKInitializer.php:96]
#7 CoolPartner\Integration\Model\SDKInitializer->execute() called at [vendor/CoolPartner/magento2-integration/src/Integration/Plugin/AppFrontControllerPlugin.php:42]
#8 CoolPartner\Integration\Plugin\AppFrontControllerPlugin->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#000000005404ea3200000000756a40ab#, &Closure#000000005404ea2d00000000756a40ab#, &Magento\Framework\App\Request\Http#000000005404e62700000000756a40ab#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#9 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#000000005404e62700000000756a40ab#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#10 Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#000000005404e62700000000756a40ab#), array(array('storeCookieValid...', 'install', 'configHash'), 'requestPreproces...')) called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#11 Magento\Framework\App\FrontController\Interceptor->dispatch(&Magento\Framework\App\Request\Http#000000005404e62700000000756a40ab#) called at [vendor/magento/framework/App/Http.php:136]
#12 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#13 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:258]
#14 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000005404edf400000000756a40ab#) called at [index.php:39]
</pre>
I grepped through the code base looking for anything remotely mentioning Amasty or Amasty_Base but I can't find anything.
I've made sure all caches are off and cleared, and all pre-compiled code is gone etc.
Curiously, I even edited Magento\Framework\Component\ComponentRegistrar
and added an exit
statement in the register
function, but nothing seemed to reach that point in the code.
What have I missed? Am I misunderstanding Magento somehow?
php bin/magento setup:di:compile
command? if not, please execute it as wellgenerated
folder which clears compiled code several times.composer remove Amasty/Base
and run magento commands after that