Skip to content

Disable Modules Output - everything appears enabled #7418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
garrypark opened this issue Nov 14, 2016 · 17 comments
Closed

Disable Modules Output - everything appears enabled #7418

garrypark opened this issue Nov 14, 2016 · 17 comments
Labels
bug report Component: Config Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release

Comments

@garrypark
Copy link

Advanced/Advanced/Configuration -- Disable Modules Output - everything appears enabled

Magento version, 2.1.2,

Expected result

  1. Set module to disable
    Actual result when saved
  2. Stays enabled

Some modules are disabled even though they appear enabled in the Advanced/Advanced/Configuration page

@sergiojovanig
Copy link

Same here in 2.1.2.

The only way you can change these values is through MySQL client directly.

@orlangur
Copy link
Contributor

Is this feature any useful for you BTW? I remember it was planned to be removed at some point but either the plan was changed or it is simply a low priority task.

@wenpingguo
Copy link

Same here in 2.1.2.
Cannot disable module in admin Disable Modules Output.

@sjovanig You can still disable module module using command line in project root
php bin/magento module:disable Vendor_Module
If you disable a module this way, the module will be removed from Disable Modules Output .
I think that's why "everything appears enabled". And you cannot enable it via Disable Modules Output.
need to enable it by
php bin/magento module:enable Vendor_Module

I tested this in a freshly installed magento 2.1.2. The behaviour is a little bit different.
if you disable some modules, These module will display as "disabled". However, they are not really been disabled. They are still functional.
If you check module status in command line
php bin/magento module:status
Output:
List of disabled modules:
None

@sergiojovanig
Copy link

@wenpingguo

Executing "module:disable" you are completely disabling a module and that can breaks your site.

"Disable Modules Output" does not disable modules, only their output.

For example, module Magento_Review cannot be easily disabled cause its dependences, try it. The only way is forcing it with "--force" parameter.

So this functionality is broken and has to be fixed.

@southerncomputer
Copy link
Contributor

Module:Disable does not get rid of DI on those modules - only after removing the code does the DI dependencies go away! This should not be the case!

@orlangur
Copy link
Contributor

@sjovanig

Executing "module:disable" you are completely disabling a module and that can breaks your site

This can happen only for poorly written module.

module Magento_Review cannot be easily disabled cause its dependences

Surely, core modules mostly cannot be disabled, there is only a small subset of disableable core modules like ConfigurableProduct, GroupedProduct etc.

Do you know any valid real-world use case for Disable Module Output feature?

@bartoszkubicki
Copy link

same on 2.1.1

@mattcoz
Copy link

mattcoz commented Jan 9, 2017

Still an issue in 2.1.3, please fix this.

"Do you know any valid real-world use case for Disable Module Output feature?"

Yes! There are many features that I don't want to use on my site. I can't disable the modules because of dependencies, but disabling the output so they don't appear on any pages is very useful. The function itself used to work, but when you go back to the admin page everything appears as "Enabled", even if they are disabled. Now in 2.1.3 it seems to not work at all.

edit: To add on to that point, I was just trying to remove any reference to newsletters throughout the site. In numerous template files there is a function call to isNewsletterEnabled(). This function checks if the module output is disabled. But, since this isn't working, I have to edit all the templates and possibly cause problems with future updates.

edit: I'm thinking this may be related: #7949

edit: Eureka! I changed the "scope" value in the database from "websites" to "default" and both of the issues were fixed. Unfortunately, updating any values from the admin still set the "websites" value so I need to resort to editing the database directly instead.

@aaronallen8455
Copy link

In 2.1.3, I'm not able to disable module output in single store mode, but I can with single store mode disabled. I just disable the modules with single store mode disabled then turn it back on.

@ghost
Copy link

ghost commented Mar 24, 2017

Same issue in 2.1.4. Any workarounds that don't involve needing to manually edit the database?

@orlangur
Copy link
Contributor

Hooray! This poor feature is deprecated since 2.2.0.

There are many features that I don't want to use on my site. I can't disable the modules because of dependencies, but disabling the output so they don't appear on any pages is very useful.

I do agree that this is a real pain with some Magento 1 legacy code but in process of time developers shall create their extensions with modularity in mind so that disabling module does not break the site.

In Magento 2 core there are some disableable modules already, like ConfigurableProduct and GroupedProduct, all new nonmandatory modules should be disableable as well.

Disabling output for any nondisableable module could be achieved pretty easily by template customization.

@IlnitskiyArtem
Copy link

@garrypark, Thanks for reporting this issue
We've created internal ticket MAGETWO-70103 to address this issue.
But, this functional is deprecated since 2.2.0 and will be deleted.

@veloraven veloraven added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jun 23, 2017
@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Component: Config Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 11, 2017
@magento-engcom-team
Copy link
Contributor

@garrypark, thank you for your report.
The issue is already fixed in develop branch, 2.2.0

@magento-engcom-team magento-engcom-team added Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release labels Oct 13, 2017
@xanka
Copy link

xanka commented Mar 9, 2018

the issue not resolve in Magento 2.2.3. I tried create custom module. In this module the layout I add custom link in block name "customer_account_navigation". Module disabled but it showing.

@orlangur
Copy link
Contributor

orlangur commented Mar 9, 2018

@xanka please read 2.2 release notes more carefully. "Disable Module Output" feature is deprecated, you're supposed to disable module if you don't need it instead of disabling just output.

@leedave
Copy link

leedave commented Mar 21, 2019

@orlangur You are comparing two different features. Disabling a module can potentially break your site, if there are dependencies.
Disabling the output of a module, prevents it from appearing in the interface, but does not remove dependencies. This can be a huge benefit, if you want to hide one of the many standard features that cannot be removed due to DI.

@orlangur
Copy link
Contributor

@leedave,

Disabling a module can potentially break your site, if there are dependencies.

No. Dependencies should be properly declared.

Disabling the output of a module, prevents it from appearing in the interface, but does not remove dependencies

It leaves hidden dependencies pretending to just hide the undesired output.

Features should be written in such a way that disabling module does not break anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Config Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release
Projects
None yet
Development

No branches or pull requests