yii2-assets-auto-compress icon indicating copy to clipboard operation
yii2-assets-auto-compress copied to clipboard

yii2-assets-auto-compress not working; the compress css content is empty and js contains ;;;;;;;;;;;;;

Open aidonsnous opened this issue 8 years ago • 7 comments

my configuration is as follow:

'bootstrap'=>['assetsAutoCompress'], 'components' => [ 'assetsAutoCompress' => [ 'class'=>'skeeks\yii2\assetsAuto\AssetsAutoCompressComponent', 'enabled'=> true, 'jsCompress'=> true, 'cssFileCompile' => true, 'jsFileCompile' => true, ],]

I can see it is compiling all assets(jqueryAsset, YiiAsset, AppAsset,..) and bringing one js compressed file and one css compressed file. But the css compressed is empty(nothing inside) and the content of the js compressed file is : ;;;;;;;;;;;;;;;;;;;;;;;;; which is making even the call of $.() to prompt error in consolog:

(index):899 Uncaught ReferenceError: jQuery is not defined(anonymous function) @ (index):899

aidonsnous avatar Jul 16 '16 03:07 aidonsnous

Sorry, I never wrote about it. However, this tool only works on real sites. On the local projects is not working.

skeeks-semenov avatar Jul 16 '16 05:07 skeeks-semenov

@skeeks-semenov , Thanks for your quick assist; Mine is not local project; it is a real web site(uploaded on a vps server). May be I don't understand what you mean by "real site".

aidonsnous avatar Jul 16 '16 19:07 aidonsnous

Is there any solution?

aidonsnous avatar Jul 18 '16 15:07 aidonsnous

Can you tell the address of your site that are trying this solution?

skeeks-semenov avatar Jul 18 '16 16:07 skeeks-semenov

It is not yet accessible to public.

aidonsnous avatar Jul 18 '16 19:07 aidonsnous

That's the problem, this solution only works with public projects. Because it uses php file_get_contents function to retrieve the contents of css and js files that you have in fact closed.

skeeks-semenov avatar Jul 18 '16 20:07 skeeks-semenov

I am using it in real server, but it's not working. After using this it says "The view file does not exist". My site location is (http://bestinbd.com/projects/web/1705ADL/dev/)

msdksr avatar Aug 02 '17 05:08 msdksr