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

Jump to content

  • (7 Pages)
  • +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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

#61 User is offline   limitless 

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

Posted 27 September 2012 - 07:32 PM

do you have any updates on this? if not, i will have a look and see if anything needs to be fixed from minScript's side...

View Postyugene, on 12 September 2012 - 05:53 AM, said:

Thank you for the upgrade. I successfully use this extension with several projects and now trying to implement its new version.
So far everything works great except in conjunction with tinymce extension. The page where this extension is used started to throw various js errors and editor isn't launched.
I'll report if will find what causes the problem, but as it seems at the first glance -- paths to tinymce js files aren't rendered properly.

0

#62 User is offline   limitless 

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

Posted 27 September 2012 - 07:35 PM

Hi Yuga

Thank you very much for the appreciation. Im glad you like minScript.

I removed the version mark some time ago since it made it easier to maintain but i will reconsider it for future versions...

View Postyugene, on 27 September 2012 - 02:17 AM, said:

Hi Teamtpg,


Could you please add version mark to the code (at least I couldn't find anything related)?
I use your extension at several projects and sometimes get lost which project uses which version and if it is the latest version at all.

Thank you very much for you work, minScript is extremely useful and became unbelievably handy with the latest upgrades.

Yuga

0

#63 User is offline   yugene 

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

Posted 27 September 2012 - 09:16 PM

TINYMCE:
Unfortunately, I just didn't have enough time to dig into the problem, and I didn't find what causes the problem during the time I had (at the moment, again unfortunately, I don't even remember at which stage I stopped), so I just used your WYSIWYG editor editMe :) and it works fine.



0

#64 User is offline   limitless 

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

Posted 28 September 2012 - 10:12 AM

of course i did that on purpose, the only editor working with minScript is editMe ... just kidding ;)

okey good to know, thanks for the feedback, i will take a look at the tinymce extension anyways just to see whats going on. i will post back with feedback sooner or later :)

View Postyugene, on 27 September 2012 - 09:16 PM, said:

TINYMCE:
Unfortunately, I just didn't have enough time to dig into the problem, and I didn't find what causes the problem during the time I had (at the moment, again unfortunately, I don't even remember at which stage I stopped), so I just used your WYSIWYG editor editMe :) and it works fine.




0

#65 User is offline   pixel-shock 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 26-October 11

Posted 06 October 2012 - 08:00 AM

Hi,

first: THANKS for your great extension.
On my Mac (running with Mamp Pro) I got the following response on minified css and js files:

[code]
<br class="Apple-interchange-newline"><br style="box-sizing: border-box; ">��=k��F���+x�J�(��,.v�\�n`g/9�J�$f(�!��'���U���ř��^�3dwuuuu��������ʢ7J��2n��#^Wn�)�}�����ww#w��������J��ݟǬ�ݼ��p�*�0���,�uO�Y�Q������{7�o��P�w����-�}���0Mݲ*���-�+����a���č�g�F����1u���$q�q�n�b������6>Dn�R2̫$;��L�ɲʭvq� ���"7,�dM�2�6��ȓ�qᒖ��m���pt!(A��U�؇ŝ�$s�Lv������9� 9l��UV0�!;Vir���Mv��e�W�z��������0M���*,c�p��w�C�����Qć������[.�!F/�H��Y�2�?ś?ك�P��o�Y�)��4���M�����_gi�e�?p:�����v��()�4|X�y,wq��U�a��!*�Ue9y��Y�D�W��z������99��[font=Menlo, monospace][size=2]�2��<)3�'Q��iNd������)�˸H6�W(˲��}��}_`9�}>��Sr��jɀ� �aUş+�U��ϿFc����[���k�M�O҇�>;D�t���hەu��0\ei�$C�ay���>��=`�>�&�$M����� ����Ne�dG���*���G�p�ˀ�n�a���'�����}R�`���ҬX|5
0

#66 User is offline   pixel-shock 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 26-October 11

Posted 06 October 2012 - 08:25 AM

OK, I found the problem:

You have to enable output buffering in php.ini in MAMP, MAMP Pro
output_buffering = On


Cheers
0

#67 User is offline   hybris 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 24-September 12

Posted 08 October 2012 - 01:03 PM

View PostTeamTPG, on 25 September 2012 - 08:47 AM, said:


Currently the etag is based on the last modified timestamp, so theoretically the etag could differ on different servers if the filemtime is not the same between servers. If the filemtime is the same on all the servers, the etag will be the same as well...


Thank you very much... now all is more clear :)
0

#68 User is offline   limitless 

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

Posted 08 October 2012 - 05:23 PM

my pleasure

View Posthybris, on 08 October 2012 - 01:03 PM, said:

Thank you very much... now all is more clear :)

0

#69 User is offline   limitless 

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

Posted 08 October 2012 - 05:25 PM

thank you very much for the feedback

View Postpixel-shock, on 06 October 2012 - 08:25 AM, said:

OK, I found the problem:

You have to enable output buffering in php.ini in MAMP, MAMP Pro
output_buffering = On


Cheers

0

#70 User is offline   Aziz Yuldashev 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 11-October 12

Posted 11 October 2012 - 12:44 PM

Hello, TeamTPG, thank you for the wonderful extension — definitely saved me a lot of time! Although I can't wait to use it on our project, there are some things left to figure out.

Most of our client scripts are loaded manually in specific groups. Therefore, file modification checks really slow things down. I am playing around with minScriptLmCache param as you suggested.

Is there a way to manually flush the lmCache? I mean, in production we could set the minScriptLmCache param to 1 year and every time we performed a release we would simply trigger cache invalidation. Is there a command or an action for this, like, for instance, one can clear the /assets directory in order to force all users to redownload the newer version of assets.

I would greatly appreciate any advice on that.
0

#71 User is offline   limitless 

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

Posted 18 October 2012 - 03:23 AM

Hey Aziz Yuldashev

you are very welcome!

Yes, there is an easy way to do that:
Since minScript uses Yii's cache application components, you can just flush the cache with the built in methods.
Lets assume you are using the default configuration where minScript operates under the clientScript application component ID:
Yii::app() -> clientScript -> minScriptCache -> flush();


thats it! :)

View PostAziz Yuldashev, on 11 October 2012 - 12:44 PM, said:

Hello, TeamTPG, thank you for the wonderful extension — definitely saved me a lot of time! Although I can't wait to use it on our project, there are some things left to figure out.

Most of our client scripts are loaded manually in specific groups. Therefore, file modification checks really slow things down. I am playing around with minScriptLmCache param as you suggested.

Is there a way to manually flush the lmCache? I mean, in production we could set the minScriptLmCache param to 1 year and every time we performed a release we would simply trigger cache invalidation. Is there a command or an action for this, like, for instance, one can clear the /assets directory in order to force all users to redownload the newer version of assets.

I would greatly appreciate any advice on that.

0

#72 User is offline   Idan Hen 

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

Posted 27 October 2012 - 05:11 PM

Hey ,

I love this extension.

my question is , if i set to debug , the scripts are minified anyway , and i checked and the GET is sending debug=1. but the file the minScript is creating is not only concatinated but also minifed.

so how can i do the following :
1. set Debug = 1
2. all js scripts are in 1 file
3. not minified file...

is it possible ? thanks
0

#73 User is offline   limitless 

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

Posted 31 October 2012 - 11:42 AM

Hey Idan Hen

Thank you very much :)

did you set the minScriptDebug property to true?

if yes, this should be working correctly and serve unminified and combined files with other helpful debug comments like line numbers and filenames. if files which are loaded by minscript are already minified then unfortunately this setting wont "unminify" the files. so if you want to see unminified files when minScriptDebug is set to TRUE, also ensure that the original files which minScript loads are not minified.

View PostIdan Hen, on 27 October 2012 - 05:11 PM, said:

Hey ,

I love this extension.

my question is , if i set to debug , the scripts are minified anyway , and i checked and the GET is sending debug=1. but the file the minScript is creating is not only concatinated but also minifed.

so how can i do the following :
1. set Debug = 1
2. all js scripts are in 1 file
3. not minified file...

is it possible ? thanks

0

#74 User is offline   Idan Hen 

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

Posted 05 November 2012 - 10:28 AM

View PostTeamTPG, on 31 October 2012 - 11:42 AM, said:

Hey Idan Hen

Thank you very much :)

did you set the minScriptDebug property to true?

if yes, this should be working correctly and serve unminified and combined files with other helpful debug comments like line numbers and filenames. if files which are loaded by minscript are already minified then unfortunately this setting wont "unminify" the files. so if you want to see unminified files when minScriptDebug is set to TRUE, also ensure that the original files which minScript loads are not minified.



hey TeamTPG,

i set the minScriptDebug property , and it didnt help.

i did a few changes myself to make it work , i added the option to minify ( true/false) , concatinate (true/false).

since that didnt work.

yet now i have a new problem. the script is not including css files that are added in the following way :

<?php Yii::app()->clientScript->registerCssFile('/css/all.css?version='. $this->version, 'all'); ?>

after a small check its due to the 'all' parameter , any idea ?
0

#75 User is offline   limitless 

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

Posted 05 November 2012 - 10:54 AM

sorry, from the infos you gave me i cannot see/understand what is wrong with the debug property. if this is still a problem, could you please give me some more information (a sample of the original files, a sample of the minScript output, etc.).

i tried to reproduce this and in my case it was not caused by the "all" parameter but rather by the query string which is appended to the URL.

try following
<?php Yii::app()->clientScript->registerCssFile('/css/all.css', 'all'); ?>


if this is the problem, i will add a fix to this in the next minScript version

View PostIdan Hen, on 05 November 2012 - 10:28 AM, said:

hey TeamTPG,

i set the minScriptDebug property , and it didnt help.

i did a few changes myself to make it work , i added the option to minify ( true/false) , concatinate (true/false).

since that didnt work.

yet now i have a new problem. the script is not including css files that are added in the following way :

<?php Yii::app()->clientScript->registerCssFile('/css/all.css?version='. $this->version, 'all'); ?>

after a small check its due to the 'all' parameter , any idea ?

0

#76 User is offline   Idan Hen 

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

Posted 05 November 2012 - 11:20 AM

This problem was fixed , Thanks !

now its all good ;)
0

#77 User is offline   limitless 

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

Posted 05 November 2012 - 12:18 PM

thanks for the feedback :)

i will add a fix for query string URLs in the next version...

View PostIdan Hen, on 05 November 2012 - 11:20 AM, said:

This problem was fixed , Thanks !

now its all good ;)

0

#78 User is offline   MewsicLovr 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 22-June 11

Posted 19 November 2012 - 11:10 PM

Hm...I can't seem to get this to work in IIS 7. I keep getting a 500 error for the minified urls. I thought it was a problem with my configuration but when I uploaded it to an apache server it worked instantly. Not sure where to start looking. It seems to call the controller ok but I didn't debug further. Any thoughts?
0

#79 User is offline   MewsicLovr 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 22-June 11

Posted 19 November 2012 - 11:28 PM

I traced it to some kind of problem with filemtime which is returning false in IIS and so groupsConfig.php throws an internal server error. Not sure why filemtime returns false.
0

#80 User is offline   Fábio Felicidade 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 14-March 12

Posted 20 November 2012 - 02:22 PM

Hi,

Gratz on great extension, really improve overall performance on site.
But in my project, I'm using yii galleria extension and when including minScript extension, galleria doesn't render. in my page test, the images show briefly on load, without the galleria, and disappear after. No errors showing in firebug and looking at source code the galleria scripts are included. I'm using several other yii extensions and no problem came up. Egmap and tinymce as example, rendered ok.
Can't find what the problem is. Hope you can help.

Thank you.
0

Share this topic:


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