You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by bhorvat <ho...@gmail.com> on 2013/01/06 20:17:47 UTC

tapestry-yuicompressor minimization problem

I have recently added the tapestry-yuicompressor and my production code just
went crazy. I have tracked the javascript error to the problem with the
minimization. My problem was in the tapestry jquery tooltip plugin. 

Given below is that the yuicompressor has minimized for me and it was
throwing an error  


(function(d){if(!d(document.body).is("[role]")){d(document.body).attr("role","application")}var
b=0;d.widget("ui.tooltip",{options:{tooltipClass:"ui-widget-content",content:function(){return
d(this).attr("title")}
/*&position@Q&my@(left centerU&at@(right centerU&offset@(15
0RRU&_init@iSTQv&*/
return
for&&if++=this;this.tooltip=d("<div></div>").attr("id","ui-tooltip-"+b++).attr("role","tooltip").attr("aria-hidden","true").addClass("ui-tooltip
ui-widget
ui-corner-all").addClass(this.options.tooltipClass).appendTo(document.body).hide();this.tooltipContent=d("<div></div>").addClass("ui-tooltip-content").appendTo(this.tooltip);this.opacity=this.tooltip.css("opacity");this.element.bind("focus.tooltip
mouseenter.tooltip",function(e){a.open(e)}
/*h&bindS(blur.tooltip
mouseleave.tooltipUiS&eventTQ&selfh&closeS&eventTNR™Th*/
keyup(function(e){if(e.keyCode==27){a.close(e)}}
/*NR™U&enable@iSTQ*h&optionsh&disabledV+NR™U&disable@iSTQ*h&optionsh&disab*/
if&&||=true}
/*&destroy@iSTQ*h&tooltiph&removeSTN&$h&Widgeth&
prototypeh&destroyh&applyS*U*/
arguments)}
/*&widget@iSTQ*h&tooltipNR™U&open@iS&eventTQv&targetV*h&elementNlS*h&curr*/
&&switchbreak &&this.current[0]==target[0]){return}var
a=this;this.current=target;this.currentTitle=target.attr("title");var
c=this.options.content.call(target[0],function(e){if(a.current==target){a._show(event,target,e)}}
/*NlS&contentTQ&selfh&_showS&eventU&targetU&contentTNRR™U&_show@iS&eventU*/
target,c){if(!c){return}target.attr("title","");if(this.options.disabled){return}this.tooltipContent.html(c);this.tooltip.css({top:0,left:0}).show().position(d.extend(this.options.position,{of:target})).hide();this.tooltip.attr("aria-hidden","false");target.attr("aria-describedby",this.tooltip.attr("id"));if(this.tooltip.is(":animated")){this.tooltip.stop().show().fadeTo("normal",this.opacity)}else{this.tooltip.is(":visible")?this.tooltip.fadeTo("normal",this.opacity):this.tooltip.fadeIn()}this._trigger("open",event)}
/*&close@iS&eventTQlS*h&currentTQNRv&currentV*h&currenth&attrS(titleU*h&
*/
:continue dodo&&switchbreak
)function(){this.current=null;if(this.options.disabled){return}current.removeAttr("aria-describedby");this.tooltip.attr("aria-hidden","true");if(this.tooltip.is(":animated")){this.tooltip.stop().fadeTo("normal",0,function(){d(this).hide().css("opacity","")}
/*NRmQ*h&tooltiph&stopSTh&fadeOutSTNR*h&_triggerS(closeU&eventTNR™RTNR™TS&*/
{continue &&dofinally);

Do I need to configure the compressor in some kind of way? I have just added
it to the maven and it was my understanding that once added and
production-mode is set to true it should work out of the box. 

Sadly that is not the case.

Any ideas?

Thank you



--
View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-yuicompressor-minimization-problem-tp5719156.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry-yuicompressor minimization problem

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
You don't have to wait. Take a look at the bottom comments for this issue:

https://github.com/cezary-biernacki/t5conduit/issues/2

This fixes the problem with what's available now. 

On Jan 7, 2013, at 12:31 PM, bhorvat <ho...@gmail.com> wrote:

> So I should then wait for the new solution I guess. Thanks for the tip
> 
> 
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-yuicompressor-minimization-problem-tp5719156p5719192.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

Re: tapestry-yuicompressor minimization problem

Posted by bhorvat <ho...@gmail.com>.
So I should then wait for the new solution I guess. Thanks for the tip



--
View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-yuicompressor-minimization-problem-tp5719156p5719192.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry-yuicompressor minimization problem

Posted by Howard Lewis Ship <hl...@gmail.com>.
YUICompressor works poorly in some environments because it includes
overrides of parts of Rhino; in some servers, the classloading scheme makes
the monkey-patching of Rhino fail in very difficult to diagnose ways. I
have higher hopes for WRO4J.

In 5.4, I've added special cases for some of the YUICompressor warnings, to
get rid of them.


On Sun, Jan 6, 2013 at 9:30 PM, bhorvat <ho...@gmail.com> wrote:

> Well that is good to know, however something still breaks the minimizing in
> production, any ideas what or how can I look into this?
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/tapestry-yuicompressor-minimization-problem-tp5719156p5719160.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: tapestry-yuicompressor minimization problem

Posted by bhorvat <ho...@gmail.com>.
Well that is good to know, however something still breaks the minimizing in
production, any ideas what or how can I look into this?



--
View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-yuicompressor-minimization-problem-tp5719156p5719160.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry-yuicompressor minimization problem

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
These warnings is what I get too in my production code. They don't affect anything. I just suppress these on production machines. 
I run glassfish servers and it works fine. 

On Jan 6, 2013, at 1:30 PM, bhorvat <ho...@gmail.com> wrote:

> I am running my code locally now and setting the production-mode flag to
> true. It seems that on jetty this problem is not present (my production code
> runs on Tomcat 7 on AWS so I think that is there it fails). However I do see
> some warning 
> 
> AssetsModule.ResourceMinimizer JavaScript compression problems for resource
> 'core' JavaScript stack, for locale en,
> resources=classpath:org/got5/tapestry5/tapestry.js,
> classpath:org/got5/tapestry5/jquery/jquery_core/jquery-1.7.2.min.js,
> classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.ui.core.min.js,
> classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.ui.position.min.js,
> classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.ui.widget.min.js,
> classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.effects.core.min.js,
> classpath:org/got5/tapestry5/jquery/jquery.json-2.2.js,
> classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.effects.highlight.min.js,
> classpath:org/got5/tapestry5/jquery/jquery.effects.show.js,
> classpath:org/apache/tapestry5/underscore_1_3_3.js,
> classpath:org/apache/tapestry5/t5-core.js,
> classpath:org/apache/tapestry5/t5-spi.js,
> classpath:org/got5/tapestry5/jquery/t5-jquery.js,
> classpath:org/apache/tapestry5/t5-init.js,
> classpath:org/apache/tapestry5/t5-pubsub.js,
> classpath:org/apache/tapestry5/t5-events.js,
> classpath:org/got5/tapestry5/jquery/t5-dom-jquery.js,
> classpath:org/got5/tapestry5/jquery/t5-console-jquery.js,
> classpath:org/got5/tapestry5/jquery/t5-ajax-jquery.js,
> classpath:org/apache/tapestry5/t5-formfragment.js,
> classpath:org/got5/tapestry5/jquery/t5-alerts-jquery.js,
> classpath:org/got5/tapestry5/jquery/tapestry-jquery.js,
> classpath:org/apache/tapestry5/tapestry-console.js,
> classpath:org/got5/tapestry5/jquery/t5-tree-jquery.js,
> classpath:org/apache/tapestry5/tapestry-messages.js:
> 
> [WARN] AssetsModule.ResourceMinimizer The symbol b is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> :function(a){for(var  ---> b <---  in a){return!1;}return
> [WARN] AssetsModule.ResourceMinimizer The symbol i is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> var d,e,g,h, ---> i <--- ;for(d=0,e=b
> [WARN] AssetsModule.ResourceMinimizer The symbol h is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> Array(d),g=d, ---> h <--- =d,j=d<=1&&a
> [WARN] AssetsModule.ResourceMinimizer The symbol l is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> ,h,i,j,k, ---> l <--- ,m,n,o,p=c
> [WARN] AssetsModule.ResourceMinimizer The symbol q is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> p=c.createElement("div"), ---> q <---
> =c.documentElement;p.setAttribute("className"
> [WARN] AssetsModule.ResourceMinimizer The symbol h is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> ){var d,e,g, ---> h <--- ,i,j,l,m,n
> [WARN] AssetsModule.ResourceMinimizer The symbol q is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> ,m,n,o,p, ---> q <--- ,r,s;if(!(a
> [WARN] AssetsModule.ResourceMinimizer The symbol u is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> ,q,r,s,t, ---> u <--- ;g[0]=c,c.
> [WARN] AssetsModule.ResourceMinimizer The symbol g is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> .relatedTarget,e=a.handleObj, ---> g <--- =e.selector,h;if(!
> [WARN] AssetsModule.ResourceMinimizer The symbol h is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> var c,e,f,g, ---> h <--- ,i,j,k=b[1
> [WARN] AssetsModule.ResourceMinimizer The symbol bind is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> ){};_.bind=function ---> bind <--- (func,context){var bound,args
> [WARN] AssetsModule.ResourceMinimizer The symbol spi is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> {var _=T5._;var  ---> spi <--- =T5.spi;var exceptionContainer,iframe,
> [WARN] AssetsModule.ResourceMinimizer The symbol form is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> (spec.element+"-hidden");var  ---> form <--- =$(hidden.form);var opts
> [WARN] AssetsModule.ResourceMinimizer The symbol options is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> if(fragment){}else{var  ---> options <--- ={};container.fadeOut("slow",
> [WARN] AssetsModule.ResourceMinimizer The symbol url is declared but is
> apparently never used.
> This code can probably be written in a more compact way.
> return$.tapestry.utils.ajaxRequest( ---> url <--- ,{success:options});}var 
> 
> AssetsModule.ResourceMinimizer Minimized 'core' JavaScript stack, for locale
> en, resources=classpath:org/got5/tapestry5/tapestry.js,
> classpath:org/got5/tapestry5/jquery/jquery_core/jquery-1.7.2.min.js,
> classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.ui.core.min.js,
> classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.ui.position.min.js,
> classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.ui.widget.min.js,
> classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.effects.core.min.js,
> classpath:org/got5/tapestry5/jquery/jquery.json-2.2.js,
> classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.effects.highlight.min.js,
> classpath:org/got5/tapestry5/jquery/jquery.effects.show.js,
> classpath:org/apache/tapestry5/underscore_1_3_3.js,
> classpath:org/apache/tapestry5/t5-core.js,
> classpath:org/apache/tapestry5/t5-spi.js,
> classpath:org/got5/tapestry5/jquery/t5-jquery.js,
> classpath:org/apache/tapestry5/t5-init.js,
> classpath:org/apache/tapestry5/t5-pubsub.js,
> classpath:org/apache/tapestry5/t5-events.js,
> classpath:org/got5/tapestry5/jquery/t5-dom-jquery.js,
> classpath:org/got5/tapestry5/jquery/t5-console-jquery.js,
> classpath:org/got5/tapestry5/jquery/t5-ajax-jquery.js,
> classpath:org/apache/tapestry5/t5-formfragment.js,
> classpath:org/got5/tapestry5/jquery/t5-alerts-jquery.js,
> classpath:org/got5/tapestry5/jquery/tapestry-jquery.js,
> classpath:org/apache/tapestry5/tapestry-console.js,
> classpath:org/got5/tapestry5/jquery/t5-tree-jquery.js,
> classpath:org/apache/tapestry5/tapestry-messages.js (242,664 input bytes of
> JavaScript to 158,505 output bytes in 272.27 ms, 34.68% reduction)
> 
> 
> 
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-yuicompressor-minimization-problem-tp5719156p5719157.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry-yuicompressor minimization problem

Posted by bhorvat <ho...@gmail.com>.
I am running my code locally now and setting the production-mode flag to
true. It seems that on jetty this problem is not present (my production code
runs on Tomcat 7 on AWS so I think that is there it fails). However I do see
some warning 

AssetsModule.ResourceMinimizer JavaScript compression problems for resource
'core' JavaScript stack, for locale en,
resources=classpath:org/got5/tapestry5/tapestry.js,
classpath:org/got5/tapestry5/jquery/jquery_core/jquery-1.7.2.min.js,
classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.ui.core.min.js,
classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.ui.position.min.js,
classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.ui.widget.min.js,
classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.effects.core.min.js,
classpath:org/got5/tapestry5/jquery/jquery.json-2.2.js,
classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.effects.highlight.min.js,
classpath:org/got5/tapestry5/jquery/jquery.effects.show.js,
classpath:org/apache/tapestry5/underscore_1_3_3.js,
classpath:org/apache/tapestry5/t5-core.js,
classpath:org/apache/tapestry5/t5-spi.js,
classpath:org/got5/tapestry5/jquery/t5-jquery.js,
classpath:org/apache/tapestry5/t5-init.js,
classpath:org/apache/tapestry5/t5-pubsub.js,
classpath:org/apache/tapestry5/t5-events.js,
classpath:org/got5/tapestry5/jquery/t5-dom-jquery.js,
classpath:org/got5/tapestry5/jquery/t5-console-jquery.js,
classpath:org/got5/tapestry5/jquery/t5-ajax-jquery.js,
classpath:org/apache/tapestry5/t5-formfragment.js,
classpath:org/got5/tapestry5/jquery/t5-alerts-jquery.js,
classpath:org/got5/tapestry5/jquery/tapestry-jquery.js,
classpath:org/apache/tapestry5/tapestry-console.js,
classpath:org/got5/tapestry5/jquery/t5-tree-jquery.js,
classpath:org/apache/tapestry5/tapestry-messages.js:

[WARN] AssetsModule.ResourceMinimizer The symbol b is declared but is
apparently never used.
This code can probably be written in a more compact way.
:function(a){for(var  ---> b <---  in a){return!1;}return
[WARN] AssetsModule.ResourceMinimizer The symbol i is declared but is
apparently never used.
This code can probably be written in a more compact way.
var d,e,g,h, ---> i <--- ;for(d=0,e=b
[WARN] AssetsModule.ResourceMinimizer The symbol h is declared but is
apparently never used.
This code can probably be written in a more compact way.
Array(d),g=d, ---> h <--- =d,j=d<=1&&a
[WARN] AssetsModule.ResourceMinimizer The symbol l is declared but is
apparently never used.
This code can probably be written in a more compact way.
,h,i,j,k, ---> l <--- ,m,n,o,p=c
[WARN] AssetsModule.ResourceMinimizer The symbol q is declared but is
apparently never used.
This code can probably be written in a more compact way.
p=c.createElement("div"), ---> q <---
=c.documentElement;p.setAttribute("className"
[WARN] AssetsModule.ResourceMinimizer The symbol h is declared but is
apparently never used.
This code can probably be written in a more compact way.
){var d,e,g, ---> h <--- ,i,j,l,m,n
[WARN] AssetsModule.ResourceMinimizer The symbol q is declared but is
apparently never used.
This code can probably be written in a more compact way.
,m,n,o,p, ---> q <--- ,r,s;if(!(a
[WARN] AssetsModule.ResourceMinimizer The symbol u is declared but is
apparently never used.
This code can probably be written in a more compact way.
,q,r,s,t, ---> u <--- ;g[0]=c,c.
[WARN] AssetsModule.ResourceMinimizer The symbol g is declared but is
apparently never used.
This code can probably be written in a more compact way.
.relatedTarget,e=a.handleObj, ---> g <--- =e.selector,h;if(!
[WARN] AssetsModule.ResourceMinimizer The symbol h is declared but is
apparently never used.
This code can probably be written in a more compact way.
var c,e,f,g, ---> h <--- ,i,j,k=b[1
[WARN] AssetsModule.ResourceMinimizer The symbol bind is declared but is
apparently never used.
This code can probably be written in a more compact way.
){};_.bind=function ---> bind <--- (func,context){var bound,args
[WARN] AssetsModule.ResourceMinimizer The symbol spi is declared but is
apparently never used.
This code can probably be written in a more compact way.
{var _=T5._;var  ---> spi <--- =T5.spi;var exceptionContainer,iframe,
[WARN] AssetsModule.ResourceMinimizer The symbol form is declared but is
apparently never used.
This code can probably be written in a more compact way.
(spec.element+"-hidden");var  ---> form <--- =$(hidden.form);var opts
[WARN] AssetsModule.ResourceMinimizer The symbol options is declared but is
apparently never used.
This code can probably be written in a more compact way.
if(fragment){}else{var  ---> options <--- ={};container.fadeOut("slow",
[WARN] AssetsModule.ResourceMinimizer The symbol url is declared but is
apparently never used.
This code can probably be written in a more compact way.
return$.tapestry.utils.ajaxRequest( ---> url <--- ,{success:options});}var 

AssetsModule.ResourceMinimizer Minimized 'core' JavaScript stack, for locale
en, resources=classpath:org/got5/tapestry5/tapestry.js,
classpath:org/got5/tapestry5/jquery/jquery_core/jquery-1.7.2.min.js,
classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.ui.core.min.js,
classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.ui.position.min.js,
classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.ui.widget.min.js,
classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.effects.core.min.js,
classpath:org/got5/tapestry5/jquery/jquery.json-2.2.js,
classpath:org/got5/tapestry5/jquery/ui_1_8_19/minified/jquery.effects.highlight.min.js,
classpath:org/got5/tapestry5/jquery/jquery.effects.show.js,
classpath:org/apache/tapestry5/underscore_1_3_3.js,
classpath:org/apache/tapestry5/t5-core.js,
classpath:org/apache/tapestry5/t5-spi.js,
classpath:org/got5/tapestry5/jquery/t5-jquery.js,
classpath:org/apache/tapestry5/t5-init.js,
classpath:org/apache/tapestry5/t5-pubsub.js,
classpath:org/apache/tapestry5/t5-events.js,
classpath:org/got5/tapestry5/jquery/t5-dom-jquery.js,
classpath:org/got5/tapestry5/jquery/t5-console-jquery.js,
classpath:org/got5/tapestry5/jquery/t5-ajax-jquery.js,
classpath:org/apache/tapestry5/t5-formfragment.js,
classpath:org/got5/tapestry5/jquery/t5-alerts-jquery.js,
classpath:org/got5/tapestry5/jquery/tapestry-jquery.js,
classpath:org/apache/tapestry5/tapestry-console.js,
classpath:org/got5/tapestry5/jquery/t5-tree-jquery.js,
classpath:org/apache/tapestry5/tapestry-messages.js (242,664 input bytes of
JavaScript to 158,505 output bytes in 272.27 ms, 34.68% reduction)




--
View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-yuicompressor-minimization-problem-tp5719156p5719157.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org