Magento module disabled in admin but still shows as enabled when checking in front-end

Eric Libay

When checking if the module is enabled or not I found this code

Mage::getConfig()->getModuleConfig('Mage_Checkout')->is('active', 'true')

But I think this is only applicable for modules that has <active> tag in the config.xml. In my case I disabled the Mage_Checkout module in the admin but it always shows active when I tried to call the function.

Is there another way to check if a certain module is disabled in the admin area? Thanks for the help!

Fabian Schmengler

You cannot really disable extensions from the admin panel. The "Disable Modules Output" configuration is a bit misleading, all it does is to skip rendering the blocks and admin menus of the respective module.

But of course you can check this configuration to hide or disable more things as appropiate. This is the check for Mage_Checkout:

if (Mage::helper('core')->isModuleOutputEnabled("Mage_Checkout")) { ... }

Note that this will also return true if the module is inactive, because it only checks if there is a "disable module output" configuration for this module. So you need to combine both checks:

if (Mage::helper('core')->isModuleOutputEnabled("Mage_Checkout") &&
    Mage::getConfig()->getModuleConfig('Mage_Checkout')->is('active', 'true')) { ... }

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Magento Front-end "404 Not Found 1"

From Dev

Magento show 404 on custom admin module grid

From Dev

magento custom admin module save action not working

From Dev

UserForm Button Still Functioning When Disabled

From Dev

Magento Module Admin returns a 404

From Dev

Selenium Webdriver C# element.Enabled evaluating to true when element is still disabled

From Dev

404 error in the Front End of a Magento extension

From Dev

Trigger a function when an element gets enabled/disabled

From Dev

Access denied for admin users in the custom module magento

From Dev

Front end link not removing when i disble an Extension in magento

From Dev

iOS Location Services Enabled/Disabled event when application closed

From Dev

Display template in Admin Module of Magento

From Dev

ng-disabled not affecting input enabled/disabled when being changed

From Dev

Nested change event still happens when disabled

From Dev

Magento show 404 on custom admin module grid

From Dev

how to add slideshow in magento front-end

From Dev

magento mutiple shipping address not displaying on front end

From Dev

Magento + Varnish -> module double effect + show poll block even if disabled

From Dev

Change disabled/enabled when checkbox is checked/unchecked

From Dev

How to hide simple products in Magento front end?

From Dev

Magento: Disabled admin configuration option

From Dev

Admin Logged In Validation - Front End Opencart

From Dev

the button is disabled when text view is empty else is enabled

From Dev

ng-disabled not affecting input enabled/disabled when being changed

From Dev

Changing BorderColor from Button like TextColor when it's enabled/disabled

From Dev

Magento front end not redirecting properly on localhost. But admin works

From Dev

Magento - No products are showing at front end nor admin panel , though csv file imported successfully

From Dev

Jquery Button disabled and enabled when checkbox clicked

From Dev

Module not showing up in Magento ( 2.2.1) Admin panel

Related Related

  1. 1

    Magento Front-end "404 Not Found 1"

  2. 2

    Magento show 404 on custom admin module grid

  3. 3

    magento custom admin module save action not working

  4. 4

    UserForm Button Still Functioning When Disabled

  5. 5

    Magento Module Admin returns a 404

  6. 6

    Selenium Webdriver C# element.Enabled evaluating to true when element is still disabled

  7. 7

    404 error in the Front End of a Magento extension

  8. 8

    Trigger a function when an element gets enabled/disabled

  9. 9

    Access denied for admin users in the custom module magento

  10. 10

    Front end link not removing when i disble an Extension in magento

  11. 11

    iOS Location Services Enabled/Disabled event when application closed

  12. 12

    Display template in Admin Module of Magento

  13. 13

    ng-disabled not affecting input enabled/disabled when being changed

  14. 14

    Nested change event still happens when disabled

  15. 15

    Magento show 404 on custom admin module grid

  16. 16

    how to add slideshow in magento front-end

  17. 17

    magento mutiple shipping address not displaying on front end

  18. 18

    Magento + Varnish -> module double effect + show poll block even if disabled

  19. 19

    Change disabled/enabled when checkbox is checked/unchecked

  20. 20

    How to hide simple products in Magento front end?

  21. 21

    Magento: Disabled admin configuration option

  22. 22

    Admin Logged In Validation - Front End Opencart

  23. 23

    the button is disabled when text view is empty else is enabled

  24. 24

    ng-disabled not affecting input enabled/disabled when being changed

  25. 25

    Changing BorderColor from Button like TextColor when it's enabled/disabled

  26. 26

    Magento front end not redirecting properly on localhost. But admin works

  27. 27

    Magento - No products are showing at front end nor admin panel , though csv file imported successfully

  28. 28

    Jquery Button disabled and enabled when checkbox clicked

  29. 29

    Module not showing up in Magento ( 2.2.1) Admin panel

HotTag

Archive