magento2
magento2 copied to clipboard
Static content is deploying for disabled modules
Summary (*)
- Original summary from the reporter :
I disable module output for several modules (e.g Checkout, GiftRegestry) and would like to know how to exclude CSS related to these modules from styles-l/styles-m files? As I don't need to load extra CSS
Preconditions (*)
- reproduced on
2.3-develop
Steps to reproduce (*)
- Setup vanilla 2.3-develop installation
- Take a look at the file
app/design/frontend/Magento/blank/Magento_Braintree/web/css/source/_module.less
, notice the selector.payment-method-braintree
is in there and also notice this selector is in no other file in the Magento source code except for this file in theMagento_Braintree
module in theMagento/Blank
theme. - Now disable that module (and its dependency):
bin/magento module:disable Magento_Braintree Magento_BraintreeGraphQl
- Remove potential left over files:
rm -R var/view_preprocessed/* pub/static/*
- Run static content deploy:
bin/magento setup:static-content:deploy -f --theme Magento/blank en_US
- Look at the generated file
pub/static/frontend/Magento/blank/en_US/css/styles-m.css
Expected result (*)
- Not finding a reference to the selector
.payment-method-braintree
Actual result (*)
- Finding references to the selector
.payment-method-braintree
Update: In hindsight, @shkodasv is talking about the deprecated "disabling module output" feature of Magento which was removed in Magento 2.2 I believe. But the issue is still valid for disabled modules as well, or should we open a new issue then?
Hi @shkodasv. Thank you for your report. To help us process this issue please make sure that you provided the following information:
- [ ] Summary of the issue
- [ ] Information on your environment
- [ ] Steps to reproduce
- [ ] Expected and actual results
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.3-develop instance
- upcoming 2.3.x release
For more details, please, review the Magento Contributor Assistant documentation.
@shkodasv do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
- [ ] yes
- [ ] no
- Join Magento Community Engineering Slack and ask your questions in #github channel.
Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
-
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is valid
appears. -
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Description
label to the issue by yourself. -
[ ] 3. Add
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to. -
[ ] 4. Verify that the issue is reproducible on
2.3-develop
branchDetails
- Add the comment@magento give me 2.3-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.3-develop
branch, please, add the labelReproduced on 2.3.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! -
[ ] 5. Add label
Issue: Confirmed
once verification is complete. -
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hello @shkodasv. Thanks for applying, but the GitHub issue tracker is intended for Magento Core technical issues only. Please refer to the Community Forums or the Magento Stack Exchange site for advice or general discussion about this issue.
@shkodasv: I think you have a very valid point here.
@engcom-Bravo: in my opinion this is a bug and I'll re-open this ticket for now, feel free to discuss if you don't agree.
Steps to reproduce:
- Setup vanilla 2.3-develop installation
- Take a look at the file
app/design/frontend/Magento/blank/Magento_Braintree/web/css/source/_module.less
, notice the selector.payment-method-braintree
is in there and also notice this selector is in no other file in the Magento source code except for this file in theMagento_Braintree
module in theMagento/Blank
theme. - Now disable that module (and its dependency):
bin/magento module:disable Magento_Braintree Magento_BraintreeGraphQl
- Remove potential left over files:
rm -R var/view_preprocessed/* pub/static/*
- Run static content deploy:
bin/magento setup:static-content:deploy -f --theme Magento/blank en_US
- Look at the generated file
pub/static/frontend/Magento/blank/en_US/css/styles-m.css
Expected result:
- Not finding a reference to the selector
.payment-method-braintree
Actual result:
- Finding references to the selector
.payment-method-braintree
Update: In hindsight, @shkodasv is talking about the deprecated "disabling module output" feature of Magento which was removed in Magento 2.2 I believe. But the issue is still valid for disabled modules as well, or should we open a new issue then?
Ok @hostep, I'll check it.
@hostep Thanks for your reply. You are right "Disable module output" is deprecated. I didn't know it. But in case of disabling the module the same logic should work IMHO - no css should be included.
Hi @engcom-Charlie. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
-
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is valid
appears. -
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Description
label to the issue by yourself. -
[ ] 3. Add
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to. -
[ ] 4. Verify that the issue is reproducible on
2.3-develop
branchDetails
- Add the comment@magento give me 2.3-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.3-develop
branch, please, add the labelReproduced on 2.3.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! -
[ ] 5. Add label
Issue: Confirmed
once verification is complete. -
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
@hostep I reproduced the behavior following the steps You have provided. But I still better question my Lead on it before confirming the issue. Hopefully tomorrow I'll be back with the result.
Hello @shkodasv @hostep @engcom-Bravo
Finally, I have received a response from the internal team and confirmation that it is a bug. Previously were several concerns probably it was by design or so.
I will update Issue title and content based on test steps from https://github.com/magento/magento2/issues/24666#issuecomment-533676872
@sdzhepa Thank you for verifying the issue.
Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:
- [ ] Update issue content to follow format required by Issue Reporting Guidelines
Once all required information is added, please add label "Issue: Confirmed"
again.
Thanks!
:white_check_mark: Confirmed by @sdzhepa
Thank you for verifying the issue. Based on the provided information internal tickets MC-20509
were created
Issue Available: @sdzhepa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@magento I'm working on it.
Hi @rganzhuyev! :wave: Thank you for joining. Please accept team invitation :point_right: here :point_left: and self-assign the issue.
Hi @rganzhuyev. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:
-
[x] 1. Add/Edit
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to. -
[x] 2. Verify that the issue is reproducible on
2.3-develop
branchDetails
- Add the comment@magento give me 2.3-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.3-develop
branch, please, add the labelReproduced on 2.3.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! -
[ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.
- Join Magento Community Engineering Slack and ask your questions in #github channel.
Hi @Echron. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:
-
[ ] 1. Add/Edit
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to. -
[ ] 2. Verify that the issue is reproducible on
2.3-develop
branchDetails
- Add the comment@magento give me 2.3-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.3-develop
branch, please, add the labelReproduced on 2.3.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! -
[ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.
- Join Magento Community Engineering Slack and ask your questions in #github channel.
Hey guys, Until the PR in the core gets merged, feel free to use the approach described here.
cc @shkodasv
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-1306 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Alfa. Thank you for verifying the issue.
Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.