-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Asset compressing AssetController unusable in current state #7414
Comments
we even have a test for the assetcontroller so it should work fine in most cases... https://github.com/yiisoft/yii2/blob/master/tests/unit/framework/console/controllers/AssetControllerTest.php Please describe in more detail what kind of errors you see. |
Sounds like your console environment does not have OS permissions for write operations in necessary catalogs. |
thanks, I will dive in to it and report |
Ill put some errors for meta: Error because of js-folder wasnt existing (T:/wc6/assets/js). Its gone if you create it manually
Error because all-temp.css is not existing:
other error in which tmp file is renamed too soon
|
when I use an existing folder for the JS, it works for the JS. I do think this should be done by: \yii\helpers\FileHelper::createDirectory($outputFilePath); |
alright, found the issue for the CSS problem. Its because of yuicompressor 2.4.8:
see:
Solution:
Works fine now thanks |
I am having so many errors with Asset compression & the current implementation of the yii\console\controllers\AssetController that I am wondering if it is ready yet, or that there is something completely wrong at my side (windows).
All the errors relate to files not (yet) existing and folders not yet existing. With an automation tool based on your own config files, I would not expect to get any setback based on file/folder existence, especially if these are temporary.
Before going in to much detail here, is there anyone who hasnt got this in a windows setup and got it working immediately without fixing files/folders or something like that?
In my case I have had to add multiple lines to assetcontroller to get the JS working. For the CSS similar fixes werent enough, leaving me to continue further debugging to get the tmp CSS file correctly loaded into to the final css file. Perhabs it is not fully ready yet or it could use some extra fixes. If so I will create a push request with the fixes that made it working on my setup.
The text was updated successfully, but these errors were encountered: