bad minification?

51 views
Skip to first unread message

Yehonatan Moses

unread,
May 16, 2013, 5:45:57 AM5/16/13
to wr...@googlegroups.com
Hi,


I've been using wro in production, but i've noticed that the minification for css sometimes messes things up..
for example I have in my wro.xml 

        <css>/resources/css/style.css</css>
        <css>/resources/css/jquery-ui-1.9.2.custom.css</css>


when it renders the files, the style and jquery is rendered fine, but seems like when it hits the google, the entire css becomes invalid and the minified css becomes :

@font-face{font-family:'Cabin';font-style:normal;font-weight:400;src:local('Cabin Regular'),local('Cabin-Regular'),url(http:;}

the line is the last line in the css and it belongs to google fonts. any idea why it cuts the URL import in the end? (which causes the entire css to become invalid?)

also - I've noticed that when I use minified CSS and wro tries to minified them again , causing the same issues..



Cheers,
Yoni





 

Yehonatan Moses

unread,
May 16, 2013, 5:47:52 AM5/16/13
to wr...@googlegroups.com
BTW - wro version is 1.6.3 .

Alex Objelean

unread,
May 16, 2013, 5:49:19 AM5/16/13
to wr...@googlegroups.com
Please provide the sample css and the list of pre&post processors used in your environments.

Thanks,
Alex


--
You received this message because you are subscribed to the Google Groups "wro4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wro4j+un...@googlegroups.com.
To post to this group, send email to wr...@googlegroups.com.
Visit this group at http://groups.google.com/group/wro4j?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Yehonatan Moses

unread,
May 16, 2013, 6:25:12 AM5/16/13
to wr...@googlegroups.com
Hi Alex,






WRO is 
 <group name="general">
        <css>/resources/css/style.css</css>
        <css>/resources/css/jquery-ui-1.9.2.custom.css</css>
        <js>http://www.google.com/jsapi</js>
        <js>/resources/js/jquery.validate.js</js>
        <js>/resources/js/jquery.form.js</js>
        <js>/resources/js/jquery.i18n.min.js</js>
        <js>/resources/js/jquery.ui.datetimepicker.js</js>
    </group>

pre&post -  I've implemented a custom manager which calls:

        factory.addPreProcessor(getPlaceholderProcessor());
        factory.addPreProcessor(new CssImportPreProcessor());
        factory.addPreProcessor(new SemicolonAppenderPreProcessor());
        factory.addPreProcessor(new CssVariablesProcessor());
        factory.addPreProcessor(new JSMinProcessor());
        factory.addPreProcessor(new CssMinProcessor());


where getPlaceholderProcessor  is my own custom implementation which replaces a token in the css.

as for providing sample - you can check it on 



Thanks for the help
Yoni

Alex Objelean

unread,
May 16, 2013, 6:27:12 AM5/16/13
to wr...@googlegroups.com
Please, provide the original unminified css sample.

Thanks,
Alex

Yehonatan Moses

unread,
May 16, 2013, 6:30:27 AM5/16/13
to wr...@googlegroups.com
Alex,
We've just figured out something.. seems like every link that starts with http:// wro cuts it.


becomes background:url(http://) ;

Alex Objelean

unread,
May 16, 2013, 6:40:24 AM5/16/13
to wr...@googlegroups.com
It should be fixed in latest development branch (1.6.x). Could test the latest snapshot and let me know if it works for you?

Thanks,
Alex

Yehonatan Moses

unread,
May 16, 2013, 6:59:16 AM5/16/13
to wr...@googlegroups.com
ok,

You release the snapshots somewhere or should I just build the project?

Yehonatan Moses

unread,
May 16, 2013, 7:32:29 AM5/16/13
to wr...@googlegroups.com
Just downloaded from git and built version 1.6.4-SNAPSHOT.

no luck. still the same.

is there anyway I can fix it myself for now somehow?

Alex Objelean

unread,
May 16, 2013, 8:30:21 AM5/16/13
to wr...@googlegroups.com

Just build the project from the latest branch 1.6.x

Yehonatan Moses

unread,
May 16, 2013, 10:38:52 AM5/16/13
to wr...@googlegroups.com
hi,


I've  downgraded to 1.6.2 and it's working... 

Alex Objelean

unread,
May 16, 2013, 10:50:07 AM5/16/13
to wr...@googlegroups.com
I just tested with 1.6.3 and managed to reproduce the issue. With latest changes from branch 1.6.x the problem is fixed. 
Could you try when you have time to try again with 1.6.x and confirm that it is working properly. I would like to make sure that the next version doesn't have this problem anymore.

Thanks,
Alex

Yehonatan Moses

unread,
May 16, 2013, 10:55:26 AM5/16/13
to wr...@googlegroups.com
Sorry, disregard the last one.. it's working with JawrCssMinifierProcessor but not with the CSSMin

Yoni Moses

unread,
May 16, 2013, 11:00:04 AM5/16/13
to wr...@googlegroups.com

I saw that the commit in git was for tests only..? am I missing something?

I'd be happy to test and check.

--
You received this message because you are subscribed to a topic in the Google Groups "wro4j" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wro4j/zz-c7l4Emag/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to wro4j+un...@googlegroups.com.

Alex Objelean

unread,
May 16, 2013, 12:39:39 PM5/16/13
to wr...@googlegroups.com

Yes. The tests prove that the bug is fixed. Are you sure you have used the latest build from 1.6.x?

Yehonatan Moses

unread,
May 21, 2013, 7:30:21 AM5/21/13
to wr...@googlegroups.com
Hi,

Tested and deployed in prod. seems to be working now;)

Thanks.

p.s - when is the next release scheduled?

Alex Objelean

unread,
May 21, 2013, 7:34:05 AM5/21/13
to wr...@googlegroups.com
There are couple of issues to be fixed before releasing a new version. Until then,  you can test a nightly build which is available on sonatype nexus repo: https://oss.sonatype.org/content/repositories/snapshots/

Cheers,
Alex
Reply all
Reply to author
Forward
0 new messages