Yii Framework Forum: [EXTENSION] minScript - Yii Framework Forum

Jump to content

  • (6 Pages)
  • +
  • « First
  • 4
  • 5
  • 6
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] minScript combine, minify, compress, cache Rate Topic: ***** 2 Votes

#101 User is offline   limitless 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 120
  • Joined: 22-July 11

Posted 23 May 2013 - 07:59 AM

New version available. See the Changelog for a list of changes, bugfixes and improvements.
0

#102 User is offline   yugene 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 504
  • Joined: 08-August 09

Posted 24 May 2013 - 01:44 AM

View PostTeamTPG, on 23 May 2013 - 07:59 AM, said:

New version available.

Great! Thank you for your work! I use your extension all the time and it's very useful.



0

#103 User is offline   limitless 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 120
  • Joined: 22-July 11

Posted 25 May 2013 - 10:03 AM

My pleasure, I'm glad it's useful for you!

View Postyugene, on 24 May 2013 - 01:44 AM, said:

Great! Thank you for your work! I use your extension all the time and it's very useful.




0

#104 User is offline   ionnini 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 25-April 12

Posted 24 July 2013 - 07:26 AM

Hi and thank you for this awesome extension!

I have a problem when excluding files like this for elrte extension:
'minScriptUrlMap'=>array('*elrte*' => false)


The files are excluded but the rest minified css and js are giving this error:
Property "ExtMinScriptController.minScriptUrlMap" is not defined.


I want to exclude Elrte css because this extension is publishing the images in assets folder and the baground url
url("../images/elrte-toolbar.png")
is not loading.

Thanks a lot!
0

#105 User is offline   limitless 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 120
  • Joined: 22-July 11

Posted 24 July 2013 - 10:47 AM

Youre very welcome :)

Looks like you have defined the property minScriptUrlMap for the controller instead of the component. Please make sure the property is set for ExtMinScript and not ExtMinScriptController inside Yii's application configuration.

About the URL issues inside the CSS files, this shouldnt be happening since minScript rewrites the URLs inside them. Most likely something else is the issue or not configured completely.

View Postionnini, on 24 July 2013 - 07:26 AM, said:

Hi and thank you for this awesome extension!

I have a problem when excluding files like this for elrte extension:
'minScriptUrlMap'=>array('*elrte*' => false)


The files are excluded but the rest minified css and js are giving this error:
Property "ExtMinScriptController.minScriptUrlMap" is not defined.


I want to exclude Elrte css because this extension is publishing the images in assets folder and the baground url
url("../images/elrte-toolbar.png")
is not loading.

Thanks a lot!

0

#106 User is offline   Scott Gardner 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 03-May 13

Posted 05 August 2013 - 07:09 PM

I am using the bootstrap extension. When I add the minScript extension, TbButtonColumn buttons are not displayed. Any ideas?
0

#107 User is offline   storemalt 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 22-April 11

Posted 17 August 2013 - 03:11 AM

View PostScott Gardner, on 05 August 2013 - 07:09 PM, said:

I am using the bootstrap extension. When I add the minScript extension, TbButtonColumn buttons are not displayed. Any ideas?


I have the same problem, seems that the css cant reference the images in the assets folder properly.. any ideas?
0

#108 User is offline   Scott Gardner 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 03-May 13

Posted 17 August 2013 - 06:16 AM

View Poststoremalt, on 17 August 2013 - 03:11 AM, said:

I have the same problem, seems that the css cant reference the images in the assets folder properly.. any ideas?


Since it appears to work fine for me in production, just not in debug, I added logic to my config to disable minScript in debug.

if ($host != 'localhost') { // Production
    ...    
    $minScriptDebug = false;
} else { // Development
    ...
    $minScriptDebug = true;
}
...
        'clientScript'=>array(
            'class'=>'ext.minScript.components.ExtMinScript',
            'minScriptDebug'=>$minScriptDebug,
        ),
...

0

#109 User is offline   jcaff 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 20-August 13

Posted 20 August 2013 - 07:00 AM

I'm having a similar problem with jquery-ui.

The path to jquery-ui is
/my/path/to/jquery
so i do
Yii::app()->clientScript->registerCssFile('/my/path/to/jquery/jquery-ui.min.css');


The images used in the css-file are in
/my/path/to/jquery/images
and they are referenced like
background: url("images/animated-overlay.gif");


This leads to a request like
/min/images/animated-overlay.gif
which gives an 404 error.

Anything i can do about this?

Thanks, best regards Joe.
0

#110 User is offline   Impulse Webdesign 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 19-February 11
  • Location:Leeuwarden

Posted 22 August 2013 - 10:32 AM

Hi Limitless,

First of all I want to thank you for making this extension!
Would it be possible to also include minification of inline style- and script-blocks in a future release?

Best regards,
Jesse
0

#111 User is offline   webservice 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 15-December 10

Posted 26 August 2013 - 03:13 AM

Hello,

I used the ext with no problem until I erased the assets folder. From then there is a "NetworkError: 500 Internal Server Error" because the program cannot find the minified files. Is there any configuration option to check the existence of the files and if not to re-create them?

thank you
0

#112 User is offline   limitless 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 120
  • Joined: 22-July 11

Posted 21 October 2013 - 10:44 AM

thanks for reporting this...

are the images, which are referenced in the css files, stored in a symlinked folder?

View PostScott Gardner, on 05 August 2013 - 07:09 PM, said:

I am using the bootstrap extension. When I add the minScript extension, TbButtonColumn buttons are not displayed. Any ideas?



View Poststoremalt, on 17 August 2013 - 03:11 AM, said:

I have the same problem, seems that the css cant reference the images in the assets folder properly.. any ideas?



View PostScott Gardner, on 17 August 2013 - 06:16 AM, said:

Since it appears to work fine for me in production, just not in debug, I added logic to my config to disable minScript in debug.

if ($host != 'localhost') { // Production
    ...    
    $minScriptDebug = false;
} else { // Development
    ...
    $minScriptDebug = true;
}
...
        'clientScript'=>array(
            'class'=>'ext.minScript.components.ExtMinScript',
            'minScriptDebug'=>$minScriptDebug,
        ),
...




View Postjcaff, on 20 August 2013 - 07:00 AM, said:

I'm having a similar problem with jquery-ui.

The path to jquery-ui is
/my/path/to/jquery
so i do
Yii::app()->clientScript->registerCssFile('/my/path/to/jquery/jquery-ui.min.css');


The images used in the css-file are in
/my/path/to/jquery/images
and they are referenced like
background: url("images/animated-overlay.gif");


This leads to a request like
/min/images/animated-overlay.gif
which gives an 404 error.

Anything i can do about this?

Thanks, best regards Joe.

0

#113 User is offline   limitless 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 120
  • Joined: 22-July 11

Posted 21 October 2013 - 10:51 AM

Hey Jesse

Thanks for this proposal, I will consider this for a future release

Kind regards

View PostImpulse Webdesign, on 22 August 2013 - 10:32 AM, said:

Hi Limitless,

First of all I want to thank you for making this extension!
Would it be possible to also include minification of inline style- and script-blocks in a future release?

Best regards,
Jesse

0

#114 User is offline   limitless 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 120
  • Joined: 22-July 11

Posted 21 October 2013 - 10:54 AM

Hello webservice

minScript does not store anything inside the assets folder and therefore i doubt minScript is responsible for the error messages you see.

Make sure that Yii can create an "assets" folder by having the correct write permissions to the file system path. As soon as Yii has write permissions, it will automatically recreate any missing files in the "assets" folder.

View Postwebservice, on 26 August 2013 - 03:13 AM, said:

Hello,

I used the ext with no problem until I erased the assets folder. From then there is a "NetworkError: 500 Internal Server Error" because the program cannot find the minified files. Is there any configuration option to check the existence of the files and if not to re-create them?

thank you

0

#115 User is offline   Vankata 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 28-November 13

Posted 28 November 2013 - 02:38 PM

I registered css file in main layout
Yii::app()->clientScript->registerCssFile('url');

but after load page i see this original file. Why?
i try this Yii::app()->clientScript->registerCssFile('url',CClientScript::POS_HEAD); and
i add post_head like registerSciptFile and works page return minificed css.
Yii documentation for registerCssFile not say for suporting this parameter, but i probe and its work.
Will I have problems use
Yii::app()->clientScript->registerCssFile('url',CClientScript::POS_HEAD);

instead
Yii::app()->clientScript->registerCssFile('url');

And why
Yii::app()->clientScript->registerCssFile('url');
not work
0

#116 User is offline   jcaff 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 20-August 13

Posted 09 December 2013 - 10:05 AM

View Postlimitless, on 21 October 2013 - 10:44 AM, said:

thanks for reporting this...

are the images, which are referenced in the css files, stored in a symlinked folder?


Hi,

in my case, the referenced files are not stored in a symlinked folder.

Regards Joe.
0

#117 User is offline   Q-Zma 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 17-August 09
  • Location:Ukraine, Kharkiv

Posted 08 January 2014 - 04:31 PM

I have the same problem like Scott Gardner:

Quote

I am using the bootstrap extension. When I add the minScript extension, TbButtonColumn buttons are not displayed. Any ideas?


When minScriptDebug is true, font url replaced correctly, if false — not replaced at all.
0

#118 User is offline   Idan Hen 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 27-October 12
  • Location:Israel

Posted 17 February 2014 - 04:47 AM

Hi,

I am using minScript latest version, and i created a module with a widget.
my widget is adding some js files to a page , but when i change this js file the changes are not reflected in the page unless i am on DEBUG mode.

any ideas how i can solve this issue ?

public function init() {
 $assets = Yii::app()->assetManager->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../assets', false, -1, YII_DEBUG);
 Yii::app()->getClientScript()->registerScriptFile($assets . '/js/file_1.js', CClientScript::POS_END);
}


when changing file_1.js:
- YII_DEBUG is FALSE , changes are not reflected.
- YII_DEBUG is TRUE , changes are reflected.

any help would be great :)

Thanks
0

#119 User is offline   darkheir 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 25-July 11

Posted 27 February 2014 - 09:37 AM

Quote

I am using the bootstrap extension. When I add the minScript extension, TbButtonColumn buttons are not displayed. Any ideas?


Same problem here, when minScriptDebug is true everything work fine, but when it's false the bootstrap images are not rended.

No problem whith the others stylesheets!
My blog (in french) => http://blog.devsa.org
0

#120 User is offline   darkheir 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 25-July 11

Posted 19 March 2014 - 05:06 PM

View PostScott Gardner, on 05 August 2013 - 07:09 PM, said:

I am using the bootstrap extension. When I add the minScript extension, TbButtonColumn buttons are not displayed. Any ideas?


I had the same problem, putting the following line in the config of the components solved it:

'clientScript'=>array(
    	'class'=>'ext.minscript.components.ExtMinScript',
        'minScriptDisableMin' => array('/[-\.]min\.(?:js)$/i'),
    	'minScriptLmCache' => 3600,
 ),


It seems that disabling Minification of css files was causing the problem. (I think that the symlink weren't adapted or something like this)
My blog (in french) => http://blog.devsa.org
0

Share this topic:


  • (6 Pages)
  • +
  • « First
  • 4
  • 5
  • 6
  • 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