Open webloft opened 1 year ago
Hi @webloft. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-Hotel. 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:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hello @webloft,
Thanks for the report and collaboration!
We have tried to reproduce the issue in the vanilla 2.4-develop branch. But the issue is not reproducible for us. We have followed the below DevDocs:
Can you please let us know which kind of changes is not reflecting for you after running bin/magento setup:static-content:deploy
command?
Thanks
Your basic vanilla theme may does not trigger the bugs. Therefore it's needed to test it on a real world example. We work with different clients that uses different themes and expierence the same problems. One client even uses a custom theme that is only styles and templates, no custom code or interceptors that could cause troubles.
As written before - the most common one is if a CSS file from a theme is modified by the client. This can be a normal file included via Magento_Theme/layout/default_head_blocks.xml
like this:
<css src="Magento_Theme::css/custom.css"/>
and placed in /app/design/frontend/theme/child/Magento_Theme/web/css/custom.css
We verified that the file was modified on the server.
We run the command set:sta:dep -f
in production mode. It displays the process and everything seems fine.
However, if we inspect the file in pub/static/frontend/theme/child/en_US/Magento_Theme/css
the file is there, minified as custom.min.css
but contents are not updated and the file is not touched at all.
Only if we remove the complete folder or at least the affected area/theme, the changes will be applied.
Observation:
It works if the file is not there. But for some reasons the file will be ignored if it's already there.
Also applies to dynamic JS translation file, for example: en_US/js-translation.json
.
We updated a theme translation file. It was ignored by deploy command. The changes will be applied if we remove en_US/js-translation.json
manually and then run static deploy command again.
Hello @webloft,
Thanks for the detailed description!
It helps us with the issue reproduction. The issue can be reproducible using a custom theme. After changing in the custom.css
file we need to delete either the entire folder from the pub/static
theme folder or the affected file only then the changes be reflected on the frontend.
Hence confirming the issue.
Thanks
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-10573 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Summary
There are files which gets never updated by command
set:sta:dep
- and it's very annoying if you need to this in production mode as it costs real- and downtime for clients. The only work around is to entire removingpub/static/frontend
and/orvar/view_preprocessed
.I don't know it this is reported yet, I really wonder if not. We are still expierencing this behaviour in 2.4.6
Examples
It affects multiple files if changes are made in theme files/overrides:
/app/design/<theme>/../*.css
Running
set:sta:dep -f
will update nothing here forpub/static/frontend
and switching strategy has also no effect on this.Additional Information
Your basic vanilla theme may does not trigger the bugs. Therefore it's needed to test it on a real world example. We work with different clients that uses different themes and expierence the same problems. One client even uses a custom theme that is only styles and templates, no custom code or interceptors that could cause troubles.
As written before - the most common one is if a CSS file from a theme is modified by the client. This can be a normal file included via
Magento_Theme/layout/default_head_blocks.xml
like this:<css src="Magento_Theme::css/custom.css"/>
and placed in
/app/design/frontend/theme/child/Magento_Theme/web/css/custom.css
We verified that the file was modified on the server.
We run the command
set:sta:dep -f
in production mode. It displays the process and everything seems fine.However, if we inspect the file in
pub/static/frontend/theme/child/en_US/Magento_Theme/css
the file is there, minified ascustom.min.css
but contents are not updated and the file is not touched at all.Only if we remove the complete folder or at least the affected area/theme, the changes will be applied.
Observation:
It works if the file is not there. But for some reasons the file will be ignored if it's already there.
Also applies to dynamic JS translation file, for example:
en_US/js-translation.json
.We updated a theme translation file. It was ignored by deploy command. The changes will be applied if we remove
en_US/js-translation.json
manually and then run static deploy command again.Proposed solution
No response
Release note
No response
Triage and priority