Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Problem with AssetCompress

Date: Thu, 20 Sep 2012 06:24:49 -0700 (PDT)
From: =?UTF-8?Q?Glauco_Cust=C3=B3dio?= <glauco.custo...@gmail.com>
To: cake-php@googlegroups.com
Message-Id: <e0552637-e4b2-4a8b-aefa-dd08aa421124@googlegroups.com>
In-Reply-To: <fe4d128f-5c7a-47ae-9198-0058723a05bc@googlegroups.com>
References: <af70493a-1a2d-4695-9262-701b9d614336@googlegroups.com>
 <219c1a54-fd01-4ba6-95f9-32edd57e45ea@googlegroups.com>
 <f9e4b85a-b705-4760-bc01-c1b295c3261c@googlegroups.com>
 <bbf3b60b-fa55-47a0-b724-5c890e8803bb@googlegroups.com>
 <7c688ef0-0300-4f10-96ac-6aee1e059ace@googlegroups.com>
 <fe4d128f-5c7a-47ae-9198-0058723a05bc@googlegroups.com>
Subject: Re: Problem with AssetCompress
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_254_11004479.1348147489605"

------=_Part_254_11004479.1348147489605
Content-Type: multipart/alternative; 
	boundary="----=_Part_255_261272.1348147489605"

------=_Part_255_261272.1348147489605
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Now it is working, I am getting tags like below in layout:

<script type=3D"text/javascript" src=3D"/code/asset_compress/assets/get/lib=
s.js <view-source:http://superabelha.com/code/asset_compress/assets/get/lib=
s.js>"></script><link rel=3D"stylesheet" type=3D"text/css" href=3D"/code/as=
set_compress/assets/get/all.css <view-source:http://superabelha.com/code/as=
set_compress/assets/get/all.css>" />


My images are not being displayed cause in CSS I am using relative paths,=
=20
like:

background: url("../img/style/header-bg.gif") repeat-x scroll 0 0=20
transparent;

How can I fix it?

Other point, the asset are in one file just, but they are not being=20
compressed, just included in one file..

How can I active compression in devlopment mode just for test?=20

Note: I am with debug level 2

On Thursday, September 20, 2012 9:28:58 AM UTC-3, euromark wrote:
>
> not sure if you are allowed to add filters to the files.
> I also defined the path to css in my config:
>
> [css]
> cachePath =3D WEBROOT/css/ccss/
> filters[] =3D CssMinFilter
> paths[] =3D WEBROOT/css/
>
> [js-combined.js]
> files[] =3D jquery/jquery/jquery.js
> files[] =3D jquery/plugins/jquery.livequery.js
>
> etc
>
>
> Am Donnerstag, 20. September 2012 14:13:18 UTC+2 schrieb Glauco Cust=C3=
=B3dio:
>>
>> It is defined as I posted above  http://pastebin.com/1YxYfZQ9, I have=20
>> this snippet:
>>
>> [js_libs.js]
>> files[] =3D jquery.js
>> ;files[] =3D mootools.js
>> ;files[] =3D class.js
>> filters[] =3D UglifyJs
>>
>> On Thursday, September 20, 2012 9:01:48 AM UTC-3, euromark wrote:
>>>
>>> is your js_libs defined in your asset_compress.ini?
>>> and if so, how?
>>>
>>> Am Donnerstag, 20. September 2012 13:56:16 UTC+2 schrieb Glauco Cust=C3=
=B3dio:
>>>>
>>>> I deleted error.log and refreshed my page and get this content:
>>>>
>>>> 2012-09-20 08:47:49 Error: [RuntimeException] Cannot create a script=
=20
>>>> tag for a build that does not exist.
>>>> #0 D:\my_project\code\app\View\Layouts\Default.ctp(38):=20
>>>> AssetCompressHelper->script('js_libs')
>>>> #1 D:\my_project\code\lib\Cake\View\View.php(920):=20
>>>> include('D:\my_project...')
>>>> #2 D:\my_project\code\lib\Cake\View\View.php(883):=20
>>>> View->_evaluate('D:\my_project...', Array)
>>>> #3 D:\my_project\code\lib\Cake\View\View.php(539):=20
>>>> View->_render('D:\my_project...')
>>>> #4 D:\my_project\code\lib\Cake\View\View.php(483):=20
>>>> View->renderLayout('', 'Default')
>>>> #5 D:\my_project\code\lib\Cake\Controller\Controller.php(957):=20
>>>> View->render(NULL, NULL)
>>>> #6 D:\my_project\code\lib\Cake\Routing\Dispatcher.php(193):=20
>>>> Controller->render()
>>>> #7 D:\my_project\code\lib\Cake\Routing\Dispatcher.php(161):=20
>>>> Dispatcher->_invoke(Object(HomeController), Object(CakeRequest),=20
>>>> Object(CakeResponse))
>>>> #8 D:\my_project\code\app\webroot\index.php(96):=20
>>>> Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
>>>> #9 {main}
>>>> 2012-09-20 08:47:49 Error: [MissingControllerException] Controller=20
>>>> class CssController could not be found.
>>>> #0 D:\my_project\code\app\webroot\index.php(96):=20
>>>> Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
>>>> #1 {main}
>>>> 2012-09-20 08:47:49 Error: [MissingControllerException] Controller=20
>>>> class ImgController could not be found.
>>>> #0 D:\my_project\code\app\webroot\index.php(96):=20
>>>> Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
>>>> #1 {main}
>>>>
>>>> The files that are set in asset_compress.ini exists inside webroot/css=
=20
>>>> and webroot/js...
>>>>
>>>> On Wednesday, September 19, 2012 8:06:13 PM UTC-3, euromark wrote:
>>>>>
>>>>> check out the error logs. there should be sth in /tmp/logs/error.log
>>>>> probably that a file cannot be found - therefore the whole process=20
>>>>> stops with a 404
>>>>>
>>>>>
>>>>> Am Mittwoch, 19. September 2012 19:51:07 UTC+2 schrieb Glauco Cust=C3=
=B3dio:
>>>>>>
>>>>>> Hi guys, I am trying to use AssetCompress but I am with problems.
>>>>>>
>>>>>> I followed these steps:
>>>>>>
>>>>>> - Downloaded plugin and droped into app/Plugin/AssetCompress
>>>>>> - Set CakePlugin::load('AssetCompress'); inside=20
>>>>>> app/Config/bootstrap.php
>>>>>> - Created 'cache_css' and 'cache_js' inside app/webroot/
>>>>>> - Copied asset_compress.ini file to app/Config/ -> follow current=20
>>>>>> content here: http://pastebin.com/1YxYfZQ9
>>>>>> - Added public $helpers =3D array ('AssetCompress.AssetCompress');=
=20
>>>>>> inside AppController.php
>>>>>> - Added echo $this->AssetCompress->script('js_libs'); and echo=20
>>>>>> $this->AssetCompress->css('css_all'); inside layout file
>>>>>>
>>>>>> I am trying compress files (that are inside webroot/js and=20
>>>>>> webroot/css) that I have specified inside 'asset_compress.ini' but w=
hen I=20
>>>>>> load page I get this error:
>>>>>>
>>>>>> CakePHP: the rapid development php framework
>>>>>> Cannot create a script tag for a build that does not exist.
>>>>>>
>>>>>> Error: An Internal Error Has Occurred.
>>>>>> Stack Trace
>>>>>>
>>>>>>     APP\View\Layouts\Default.ctp line 38 =E2=86=92=20
>>>>>> AssetCompressHelper->script(string)
>>>>>>     CORE\Cake\View\View.php line 920 =E2=86=92 include(string)
>>>>>>     CORE\Cake\View\View.php line 883 =E2=86=92 View->_evaluate(strin=
g, array)
>>>>>>     CORE\Cake\View\View.php line 539 =E2=86=92 View->_render(string)
>>>>>>     CORE\Cake\View\View.php line 483 =E2=86=92 View->renderLayout(st=
ring,=20
>>>>>> string)
>>>>>>     CORE\Cake\Controller\Controller.php line 957 =E2=86=92 View->ren=
der(null,=20
>>>>>> null)
>>>>>>     CORE\Cake\Routing\Dispatcher.php line 193 =E2=86=92 Controller->=
render()
>>>>>>     CORE\Cake\Routing\Dispatcher.php line 161 =E2=86=92=20
>>>>>> Dispatcher->_invoke(HomeController, CakeRequest, CakeResponse)
>>>>>>     APP\webroot\index.php line 96 =E2=86=92 Dispatcher->dispatch(Cak=
eRequest,=20
>>>>>> CakeResponse)
>>>>>>
>>>>>> Note: my debug level is 2.
>>>>>>
>>>>>> AssetCompress does not generate build file on page request? Why I am=
=20
>>>>>> getting this message? I have to do anything more?
>>>>>>
>>>>>> Thank you in advance.
>>>>>>
>>>>>
------=_Part_255_261272.1348147489605
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Now it is working, I am getting tags like below in layout:<div><br></div><d=
iv><pre id=3D"line1">&lt;script type=3D"<a>text/javascript</a>" src=3D"<a h=
ref=3D"view-source:http://superabelha.com/code/asset_compress/assets/get/li=
bs.js">/code/asset_compress/assets/get/libs.js</a>"&gt;&lt;/script&gt;
<span id=3D"line14"></span>&lt;link rel=3D"<a>stylesheet</a>" type=3D"<a>te=
xt/css</a>" href=3D"<a href=3D"view-source:http://superabelha.com/code/asse=
t_compress/assets/get/all.css">/code/asset_compress/assets/get/all.css</a>"=
 /&gt;</pre><pre id=3D"line1"><br></pre><div>My images are not being displa=
yed cause in CSS I am using relative paths, like:</div><div><br></div><div>=
background: url("../img/style/header-bg.gif") repeat-x scroll 0 0 transpare=
nt;<br></div><div><br></div><div>How can I fix it?</div><div><br></div><div=
>Other point, the asset are in one file just, but they are not being compre=
ssed, just included in one file..</div><div><br></div><div>How can I active=
 compression in devlopment mode just for test?&nbsp;<br></div><div><br></di=
v><div>Note: I am with debug level 2</div><br>On Thursday, September 20, 20=
12 9:28:58 AM UTC-3, euromark wrote:<blockquote class=3D"gmail_quote" style=
=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: =
1ex;">not sure if you are allowed to add filters to the files.<div>I also d=
efined the path to css in my config:</div><div><br></div><div><div>[css]</d=
iv><div>cachePath =3D WEBROOT/css/ccss/</div><div>filters[] =3D CssMinFilte=
r<br></div><div>paths[] =3D WEBROOT/css/<br></div></div><div><br></div><div=
><div>[js-combined.js]</div><div>files[] =3D jquery/jquery/jquery.js</div><=
div>files[] =3D jquery/plugins/jquery.<wbr>livequery.js</div><div><br></div=
></div><div>etc</div><div><br></div><div><br>Am Donnerstag, 20. September 2=
012 14:13:18 UTC+2 schrieb Glauco Cust=C3=B3dio:<blockquote class=3D"gmail_=
quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;paddi=
ng-left:1ex">It is defined as I posted above&nbsp;
<a href=3D"http://pastebin.com/1YxYfZQ9" target=3D"_blank">http://pastebin.=
com/1YxYfZQ9</a>, I have this snippet:<div><br></div><div><div>[js_libs.js]=
</div><div>files[] =3D jquery.js</div><div>;files[] =3D mootools.js</div><d=
iv>;files[] =3D class.js</div><div>filters[] =3D UglifyJs</div><br>On Thurs=
day, September 20, 2012 9:01:48 AM UTC-3, euromark wrote:<blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex">is your js_libs defined in your asset_compress.ini?<=
div>and if so, how?<br><br>Am Donnerstag, 20. September 2012 13:56:16 UTC+2=
 schrieb Glauco Cust=C3=B3dio:<blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div>=
<div>I deleted error.log and refreshed my page and get this content:</div><=
div><br></div><div>2012-09-20 08:47:49 Error: [RuntimeException] Cannot cre=
ate a script tag for a build that does not exist.</div><div>#0 D:\my_projec=
t\code\app\View\<wbr>Layouts\Default.ctp(38): AssetCompressHelper-&gt;scrip=
t('<wbr>js_libs')</div><div>#1 D:\my_project\code\lib\Cake\<wbr>View\View.p=
hp(920): include('D:\my_project...')</div><div>#2 D:\my_project\code\lib\Ca=
ke\<wbr>View\View.php(883): View-&gt;_evaluate('D:\my_<wbr>project...', Arr=
ay)</div><div>#3 D:\my_project\code\lib\Cake\<wbr>View\View.php(539): View-=
&gt;_render('D:\my_project..<wbr>.')</div><div>#4 D:\my_project\code\lib\Ca=
ke\<wbr>View\View.php(483): View-&gt;renderLayout('', 'Default')</div><div>=
#5 D:\my_project\code\lib\Cake\<wbr>Controller\Controller.php(957)<wbr>: Vi=
ew-&gt;render(NULL, NULL)</div><div>#6 D:\my_project\code\lib\Cake\<wbr>Rou=
ting\Dispatcher.php(193): Controller-&gt;render()</div><div>#7 D:\my_projec=
t\code\lib\Cake\<wbr>Routing\Dispatcher.php(161): Dispatcher-&gt;_invoke(Ob=
ject(<wbr>HomeController), Object(CakeRequest), Object(CakeResponse))</div>=
<div>#8 D:\my_project\code\app\<wbr>webroot\index.php(96): Dispatcher-&gt;d=
ispatch(Object(<wbr>CakeRequest), Object(CakeResponse))</div><div>#9 {main}=
</div><div>2012-09-20 08:47:49 Error: [MissingControllerException] Controll=
er class CssController could not be found.</div><div>#0 D:\my_project\code\=
app\<wbr>webroot\index.php(96): Dispatcher-&gt;dispatch(Object(<wbr>CakeReq=
uest), Object(CakeResponse))</div><div>#1 {main}</div><div>2012-09-20 08:47=
:49 Error: [MissingControllerException] Controller class ImgController coul=
d not be found.</div><div>#0 D:\my_project\code\app\<wbr>webroot\index.php(=
96): Dispatcher-&gt;dispatch(Object(<wbr>CakeRequest), Object(CakeResponse)=
)</div><div>#1 {main}</div></div><div><br></div><div>The files that are set=
 in asset_compress.ini exists inside webroot/css and webroot/js...</div><br=
>On Wednesday, September 19, 2012 8:06:13 PM UTC-3, euromark wrote:<blockqu=
ote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1=
px #ccc solid;padding-left:1ex">check out the error logs. there should be s=
th in /tmp/logs/error.log<div>probably that a file cannot be found - theref=
ore the whole process stops with a 404</div><div><br><br>Am Mittwoch, 19. S=
eptember 2012 19:51:07 UTC+2 schrieb Glauco Cust=C3=B3dio:<blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex">Hi guys, I am trying to use AssetCompress but I am w=
ith problems.<div><br></div><div>I followed these steps:</div><div><br></di=
v><div>- Downloaded plugin and droped into app/Plugin/AssetCompress</div><d=
iv>- Set&nbsp;CakePlugin::load('<wbr>AssetCompress'); inside app/Config/boo=
tstrap.php</div><div>- Created 'cache_css' and 'cache_js' inside app/webroo=
t/</div><div>- Copied asset_compress.ini file to app/Config/ -&gt; follow c=
urrent content here:&nbsp;<a href=3D"http://pastebin.com/1YxYfZQ9" target=
=3D"_blank">http://pastebin.com/<wbr>1YxYfZQ9</a></div><div>- Added&nbsp;pu=
blic $helpers =3D array ('AssetCompress.AssetCompress'<wbr>); inside AppCon=
troller.php</div><div>- Added&nbsp;echo $this-&gt;AssetCompress-&gt;script(=
'<wbr>js_libs'); and&nbsp;echo $this-&gt;AssetCompress-&gt;css('<wbr>css_al=
l'); inside layout file</div><div><br></div><div>I am trying compress files=
 (that are inside webroot/js and webroot/css) that I have specified inside =
'asset_compress.ini' but when I load page I get this error:</div><div><br><=
/div><div><div>CakePHP: the rapid development php framework</div><div>Canno=
t create a script tag for a build that does not exist.</div><div><br></div>=
<div>Error: An Internal Error Has Occurred.</div><div>Stack Trace</div><div=
><br></div><div>&nbsp; &nbsp; APP\View\Layouts\Default.ctp line 38 =E2=86=
=92 AssetCompressHelper-&gt;script(<wbr>string)</div><div>&nbsp; &nbsp; COR=
E\Cake\View\View.php line 920 =E2=86=92 include(string)</div><div>&nbsp; &n=
bsp; CORE\Cake\View\View.php line 883 =E2=86=92 View-&gt;_evaluate(string, =
array)</div><div>&nbsp; &nbsp; CORE\Cake\View\View.php line 539 =E2=86=92 V=
iew-&gt;_render(string)</div><div>&nbsp; &nbsp; CORE\Cake\View\View.php lin=
e 483 =E2=86=92 View-&gt;renderLayout(string, string)</div><div>&nbsp; &nbs=
p; CORE\Cake\Controller\<wbr>Controller.php line 957 =E2=86=92 View-&gt;ren=
der(null, null)</div><div>&nbsp; &nbsp; CORE\Cake\Routing\Dispatcher.<wbr>p=
hp line 193 =E2=86=92 Controller-&gt;render()</div><div>&nbsp; &nbsp; CORE\=
Cake\Routing\Dispatcher.<wbr>php line 161 =E2=86=92 Dispatcher-&gt;_invoke(=
<wbr>HomeController, CakeRequest, CakeResponse)</div><div>&nbsp; &nbsp; APP=
\webroot\index.php line 96 =E2=86=92 Dispatcher-&gt;dispatch(<wbr>CakeReque=
st, CakeResponse)</div></div><div><br></div><div>Note: my debug level is 2.=
</div><div><br></div><div>AssetCompress does not generate build file on pag=
e request? Why I am getting this message? I have to do anything more?</div>=
<div><br></div><div>Thank you in advance.</div></blockquote></div></blockqu=
ote></blockquote></div></blockquote></div></blockquote></div></blockquote><=
/div>
------=_Part_255_261272.1348147489605--

------=_Part_254_11004479.1348147489605--