Open scottsb opened 6 years ago
@mattgrul if there is a PR, I would LOVE to see it. This has been driving me nuts for a couple of years now, and it would really help my quality of life if I didn't have to keep selectively changing permissions on these static files.
I do not see PR either. Would be very pleased to see such too. Same opinion as of @Stoyvo , it's really unacceptable and pretty strange such a flaw to exists so much time on such advanced system. Someone should add more labels, like "platform health"
For those wondering, the PR is likely created on Adobe's internal VCS, so you know it's being worked on.
Hello @mattgrul @bsp-cory @kanevbg @erfanimani,
The label Progress: PR Created
was added due to the wrong status made in JIRA. It was corrected. Currently, there is no PR created for this issue.
We have tried to reproduce the issue in the latest development of Magento ie 2.4-develop but the issue is not reproducible. It might the issue is fixed and merged with the development branch.
The steps we have followed are as follows:
bin/magento deploy:mode:set production
bin/magento setup:static-content:deploy
We are able to access the homepage without any issues. Please let us know in case we have missed anything.
Thanks
Did you enable merge js/css as mentionned in the issue ?
@engcom-Hotel It seems like you are not fully understanding the issue. If you read through the entire thread you will see this is an issue with load-balanced environments. The contents of static/_cache
should be written during the compile stage, not, during the first initial web request.
@engcom-Hotel
The appropriate way to test this will be:
php bin/magento deploy:mode:set production
php bin/magento config:set dev/css/merge_css_files 1
php bin/magento cache:flush
ls pub/static/_cache/merged/
php bin/magento setup:static-content:deploy
ls pub/static/_cache/merged/
ls pub/static/_cache/merged/
IF merged css is missing in Step 7 AND missing in Step 9, then merged CSS is not working correctly, please retry the steps.
IF merged CSS is missing in Step 7, but is visible in Step 9, then you have correctly recreated the issue. Static content deploy did not generate the file as it's expected to.
Hello @Stoyvo,
Thanks for the detailed steps. We have followed the above steps as well. and for is the issue is still not reproducible. I have to add some points here to notice:
Please let us know if we have missed anything.
Thanks
:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-1005
Related issue: https://github.com/magento/magento2/issues/29172
I'm also facing this issue.
pub/static/_cache/merged/
files are not generated with command bin/magento setup:static-content:deploy
.
The first request(s) are extremly slow due to this.
Only "workaround" what I currently found is disabling the CSS merging, but this is not a solution. Does someone found a better workaround to keep merging enabled?
-- bump @engcom-Hotel
@p24-max
Does someone found a better workaround to keep merging enabled?
I use GCP containers with a "gfuse" mount to a public storage bucket where first request builds it, but it is used on every request going forward. This adds overhead to my container start time, but it's faster than rebuilding merged css.
7 years on, and we're all still generating static content triggered by the first few browsers of our sites.
Preconditions
pub/static
directory.Steps to reproduce
Clear static file cache and load home page.
Expected result
No exception should be generated.
Actual result
Exception is logged:
[2018-01-16 16:18:56] main.CRITICAL: Directory "/var/www/html/___/pub/static/_cache/merged" cannot be created Warning!mkdir(): Permission denied {"exception":"[object] (Magento\\Framework\\Exception\\FileSystemException(code: 0): Directory \"/var/www/html/___/pub/static/_cache/merged\" cannot be created Warning!mkdir(): Permission denied at /var/www/html/___/vendor/magento/framework/Filesystem/Driver/File.php:225)"} []
Commentary
This could arguably be seen as a documentation issue in which case I can report it in the devdocs repo. However, as I understand it, it seems that the documentation does describe the intended state, meaning the code should be changed instead. I'm not sure if it's possible, but if it were, ideally the merged files would be generated by
static-content:deploy
as alluded to in #9542. This would allow multiple servers in a cluster to be certain to have the merged files present in response to requests without the directory being shared among the nodes.