[EXTENSION] Optimized Client Script Resources

This is the support topic for Optimized Client Script Resources

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 );