How to fully disable (turn off) Magento module

Although the title might sound silly and so easy, there are lot of people having difficulties with this. At first turning Magento module can be easy as going trough System Configuration > Current Configuration Scope > Advanced > Advanced > Disable Module Output. However, be very careful, this action only disables module output as it says. If your module uses, let’s say some Observer functionality to hook into some part of the system and does some overriding then those actions won’t be disabled.
To fully disable module, you need to go to module config file, like /etc/ActiveCodeline_MyModule.xml, and set it’s active parametar to false, like:
< ?xml version="1.0"?>
<config>
<modules>
<activecodeline_mymodule>
<active>false</active>
<codepool>local</codepool>
</activecodeline_mymodule>
</modules>
</config>
Published in:
Leave a comment
23 comments
i have already stop this type but display on front side,
so how i can disable module ? any other way..?
@Arthur
I prefer your solution. Thanks, it works.
“codepool” should be “codePool” in your code posted. Wondering how no one noticed this in 5 years!
Aren’t you a smart M.F.
Solved the problem and posted the answer here:
http://stackoverflow.com/questions/20800741/magento-error-after-disabling-modules/20800861#20800861
Thanks
I’m facing the same problem Volker mentioned. Any help?
I’m having trouble deactivating the newsletter module. When in Magento admin I cannot edit/view any customer. Instead there’s an error message: Fatal error: Call to a member function loadByCustomer() on a non-object in /path/to/magento/app/code/core/Mage/Newsletter/Model/Subscriber.php on line 267
i need to disable my module by module enable/disable select option, that enable/disable option into my module configuration , if i disable my module it control my hole module into disable. how its possible plz hell me.. thank you
In magento v1.7, to disable the core module, under the app/etc/module you will find Mage_All.xml and from there you can set false
@Volly:
This method works the same way, and is native class Helper
This method works the same way, and is native class Helper
Well, this deffinetelly is possible to disable your module on-fly!
1. You should create observer for controller_action_layout_load_before event.
2. And then in observer method you should do smth like this :
if (Mage::helper(‘core/data’)->isModuleEnabled($moduleName)) {
$nodePath = “modules/”.$moduleName.”/active”;
Mage::getConfig()->setNode($nodePath, ‘false’, true);
}
// Disable its output as well (which was already loaded)
$outputPath = “advanced/modules_disable_output/$moduleName”;
if (!Mage::getStoreConfig($outputPath)) {
Mage::app()->getStore()->setConfig($outputPath, true);
}
Mage::app()->getCache()->clean();
3. Thats all!
What about disabling core modules? E.g. how can I disable Google Base module from my Admin?.
The folks at Yireo have what seems to be a different take on the impact of “Disable Module Output” vs XML disable. See what they say at:
http://www.yireo.com/tutorials/magento/magento-administration/665-disabling-magento-modules
oh man, thanks for this tip. Searched on google for about an hour till i found your post.
Why is this not told in the backedn or saomewhere else.
thank you for sharing.
the paid j2t discount label modul messed up a clients page and he was really depreceated. since we found your page and we could finally completely disable the module.
Is it possible to disable a module for a website or store view using this method? Please note, I am well aware of the enable/disable option in System >> Config >> Advanced, but I’d like to know if it’s possible to disable the module with the method described in this post.
i have been studying on close the models as far as possible, but i can not make a decide
@Timo and @ Fernando
you can make a small code-extension in the module while magentos module deactivation dont work correkt
put:
works in Magento 1.4.1.1
Hi – I have made a modification to the admin head.phtml (on a separate theme) which is controlled by a small module that sets the theme as active when enabled. the problem is that it keeps showing even after the module output is set to disabled. Obviously I don’t want anyone to have to set false (like you mentioned here) – as It’s a bit of an inconvenient to the end user. Could anyone share some knowledge on how to fix this?
@Timo, did you finally fix your problem? I have the same and i don’t know how to do it
What about disabling core modules? E.g. how can I disable Google Base module from my Admin?
hi,
for method containing observer tasks, I covered it with this condition:
if(!Mage::getStoreConfigFlag(‘myCompany/modulename’)) {
//codes here
}
what this condition does is, returns status of the module as its disabled in admin or not.
If its disable then my codes won’t get executed so I archive total disabled status of my module.
do you have a solution to fully disable a Module just for a specific Website, Store or View? It’s a Problem I’ve been having for a while. An just disabling the output doesn’t do the trick.
Also remember to disable System->Cache Management->Configuration cache.