-
Notifications
You must be signed in to change notification settings - Fork 124
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
Missing Folder class in asset_compressor.php #43
Comments
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. |
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...
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. |
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. |
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. |
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. |
Yeah, i am one step ahead.. I got it failing on windows line endings, I am trying to fix it now. |
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. |
Yup that fixed it - stupid windows. You'll probably want to make a similar change to JsStripCommentsFilter obj. |
…nged line endings to Unix. Ticket markstory#43
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. |
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? |
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. |
ok thanks. keep it up, this plugin freaking rocks. |
Thanks for the patches Phally! I've merged them in and added the missing import. |
Its the least I could do, since it is my fault it wasn't working in the first place hehe. Thanks for merging. |
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? |
No I forgot to both commit and push the change :( It should be there now though. |
Just starting to use this plugin - looks very promising, nice work. Js is working fine for me, but when the css_files controller is getting hit, I get:
Do you just need to do a App::import('Core', 'Folder'); before Making a Folder obj on line 89? or is my app not including this core library for some reason, when it should be?
When I add the import line to line 89, and re-run I get:
Here is the HTML:
Here is my ini. My routes are copy/paste from the wiki.
I've tried removing CssMin filter, but run into same problem.
1 more piece of info that may help, my web user has write permissions to app/webroot/cache_js and app/webroot/cache_css but I dont see any files written into them.
I'm ubuntu 10.10 64bit, PHP 5.3.3.
any ideas? thx in advance.
The text was updated successfully, but these errors were encountered: