Yii Framework Forum: [EXTENSION] Optimized Client Script Resources - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] Optimized Client Script Resources Rate Topic: -----

#1 User is offline   Vince. 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 432
  • Joined: 29-December 08
  • Location:Los Angeles,CA

Posted 02 May 2010 - 05:11 AM

This is the support topic for Optimized Client Script Resources
Vince Gabriel, Lead Developer.
Posted ImagePosted ImagePosted Image
0

#2 User is offline   timokasu 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 18-May 10

Posted 18 May 2010 - 11:43 AM

Hello, it is not possible to use standard components like CGridView with this extension due to relative resource urls in CSS files

For example:

Part of file /assets/786e83f3/gridview/styles.css containing this class:

.grid-view-loading
{
        background:url(loading.gif) no-repeat;
}


But after optimizing combined css-file /assets/f181bd15/styles.css contains


/*** CSS File Combined From: /assets/786e83f3/gridview/styles.css ***/

.grid-view-loading
{
        background:url(loading.gif) no-repeat;
}


And browser trying to load file /assets/f181bd15/loading.gif, but must /assets/786e83f3/gridview/loading.gif

And also script combining functions loads local files from absolute urls like /assets/786e83f3/gridview/styles.css, but in my case paths must be something like /www/mysite.com/public_html/assets/786e83f3/gridview/styles.css

Errors in lines 309 and 390 from clientScript.php:
309: $contents = file_get_contents( $url );
380: $contents = file_get_contents( $scriptFile );

1

#3 User is offline   Carlos Vaz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 11-June 10
  • Location:Porto Alegre/RS/Brasil

Posted 12 June 2010 - 07:22 AM

View Posttimokasu, on 18 May 2010 - 11:43 AM, said:

Hello, it is not possible to use standard components like CGridView with this extension due to relative resource urls in CSS files

For example:

Part of file /assets/786e83f3/gridview/styles.css containing this class:

.grid-view-loading
{
        background:url(loading.gif) no-repeat;
}


But after optimizing combined css-file /assets/f181bd15/styles.css contains


/*** CSS File Combined From: /assets/786e83f3/gridview/styles.css ***/

.grid-view-loading
{
        background:url(loading.gif) no-repeat;
}


And browser trying to load file /assets/f181bd15/loading.gif, but must /assets/786e83f3/gridview/loading.gif

And also script combining functions loads local files from absolute urls like /assets/786e83f3/gridview/styles.css, but in my case paths must be something like /www/mysite.com/public_html/assets/786e83f3/gridview/styles.css

Errors in lines 309 and 390 from clientScript.php:
309: $contents = file_get_contents( $url );
380: $contents = file_get_contents( $scriptFile );



Hi Guys,


I solved the problem using:
245: $contents = file_get_contents($_SERVER['DOCUMENT_ROOT'].$url );

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users