Comments (16)
I've not run into this before. However, the cache files will only be written if debug = 0 and the cacheFiles config setting is true.
Normally if AssetCompress can't find a source file it tries to log a message. If the issue is coming from a missing file, check your app's logs, there might be something there. I can add the extra folder import though, it won't hurt anything.
from asset_compress.
thanks for the quick reply. I figured it out.
So turns out I do need to add the import of Folder to 89, otherwise I always get that error.
The reason why my css was not rendering was because the CssStripCommentsFilter seems to not like some comments in one of my css files, and it was regexing out all my css files. I tried for a while to figure out what exactly in the comment was causing problems - its actually a 3rd party library I use called qtip2, here is the comment block that is causing it to fail - i narrowed it down to the 3 lines beginning with 'Dual licensed...'. From a quick look at ur regex i dont see why that would be causing problems...
/*
* qTip2 - Pretty powerful tooltips
* http://craigsworks.com/projects/qtip2/
*
* Version: 2.0.0pre
* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
*
* Dual licensed under MIT or GPLv2 licenses
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Sat Jan 15 15:15:02 2011 +0000
*/
I'm cool with leaving comments in there, not that big of a deal given what i'm really looking for is to use your build shell as part of my production build scripts, to make my css/js files so i can upload em to my CDN.
yea duh I shoulda known the debug has to be 0 to write the file.
from asset_compress.
I'll have a look at that comment block later. In the mean time you could just disable the strip comments feature. Your config file shows you are using CssMin and that should remove comments as well.
from asset_compress.
I can't reproduce this in any way. I added it to a file and it was stripped correctly. Changed the committed version a bit so there aren't any weird copyright issues, but I tried with exactly the one you pasted.
-Mark, you could merge it in for next time.
from asset_compress.
I wonder if there is some strange encoding or something in the file. I can send you the file Phally if you want (email?). CssMin handles it just fine.
Mark - can you also add the App::import('Core', 'Folder'); in models/asset_compressor.php on line 89 when your in there?
thanks.
from asset_compress.
Yeah, i am one step ahead.. I got it failing on windows line endings, I am trying to fix it now.
from asset_compress.
Can you try my fork? I think it fixes it. However I don't have test cases for it, because making everything have windows line ending would screw up the test case. So your script is my test case hehe.
from asset_compress.
Yup that fixed it - stupid windows. You'll probably want to make a similar change to JsStripCommentsFilter obj.
from asset_compress.
Yes, you are right, forgot about that one. Those things are all fixed now. And yes, stupid Windows! The person who thought different types of line endings was a good idea needs a bitchslap.
from asset_compress.
coo man thanks. Once you guys put in the 'App::import('Core', 'Folder');' change I'll close. Or would u prefer I open another issue for that?
from asset_compress.
Nay keep this one open, it has the right title. I was holding back on that one for Mark, not sure if he added the line locally.
from asset_compress.
ok thanks. keep it up, this plugin freaking rocks.
from asset_compress.
Thanks for the patches Phally! I've merged them in and added the missing import.
from asset_compress.
Its the least I could do, since it is my fault it wasn't working in the first place hehe. Thanks for merging.
from asset_compress.
I don't see the App::import('Core', 'Folder'); added in the latest source ( https://github.com/markstory/asset_compress/blob/master/models/asset_compressor.php line 89). Is it in some other branch or something?
from asset_compress.
No I forgot to both commit and push the change :( It should be there now though.
from asset_compress.
Related Issues (20)
- Editing a SASS partial in v0.20 does not trigger the output CSS file to be regenerated when "always enable controller" is false HOT 2
- Resource is duplicated when defining transitive extensions HOT 7
- Asset Compress helper not adding script files correctly when adding from view in CAKEPHP 2.x. HOT 2
- working with plugin assets is not working HOT 2
- build all js files from source folder to target folder with its same name HOT 1
- Timestamp not generated for CSS HOT 1
- build command throws error with CakePHP 4.0.0 HOT 2
- Filter that blindly executes a command HOT 4
- AssetCompressHelper::url() does not add base name HOT 2
- Turbolinks : Javascript error when debug on HOT 3
- Cannot compile SVG HOT 1
- build files HOT 3
- AssetCompressHelper Not Found HOT 1
- how to use config.ini in coffeescript
- Support for 4.3
- Deprecated method return types when running on PHP 8.1 HOT 1
- Asset
- matthiasmullie/minify Filter HOT 3
- Callback function not being called HOT 1
- 5.x: AssetCompressHelper script() function's return type is not compatible to HTML-Helper of cake 5.x HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asset_compress.