New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data URLs in CSS and JavaScript are broken after upgrading ngx_pagespeed from 1.6 to 1.7.30.2 #596

Closed
creativeprogramming opened this Issue Jan 12, 2014 · 8 comments

Comments

Projects
None yet
5 participants
@creativeprogramming
Copy link

creativeprogramming commented Jan 12, 2014

I'm using your latest release 1.7.30.2.

Before i had 1.6.29.7-beta and all was working like a charm, but after this upgrade I got reports from many hosted websites.. some of them with css issues some others with javascript issues.

One example is that:

http://parliamodivino.com/cat

should look like:

http://parliamodivino.com/cat?ModPagespeed=off

If you inspect the elements, for instance the ".facebook" social icon on the right sidebar, you see that pagespeed is doing strange things in css rewriting:

.social-icons-special .facebook a {
background: rgba(0,0,0,.1) url(http://parliamodivino.com/cache,_template,_modal-1eabe7a6.css+cache,_templa…qv==0.1+cache,_template,_template-28620727.css.pagespeed.cc.-FvUm2xruw.css) 0 0 no-repeat;
background-position: 0 0!important;
}

a merged css file as a background??

That is originally (in the ModPagespeed=off version):

.social-icons-special .facebook a {
background: rgba(0, 0, 0, 0.1) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAACiklEQ…caHEKcNtwNMST+AskuNOG3FqWimaC9bEkZxfa/Y8IQYvwCF5eaw1/Gds0AAAAASUVORK5CYII=) 0 0 no-repeat;
background-position: 0 0 !important;
}

But this worked well in the 1.6 version.

Also I get randomically javascript "undefined variable" error with ngx_pagespeed 1.7 that disappears if i clean the pagespeed cache but re-appears when the site content changes without cleaning the pagespeed cache.

This is my pagespeed configuration:

pagespeed on;
pagespeed FileCachePath /path/to/pagespeed_cache/pdv;
pagespeed Domain *parliamodivino.com;
pagespeed LoadFromFileMatch "^https?://.*parliamodivino.com/"
                       "/path/to/vhost/pdv";

pagespeed LoadFromFileRuleMatch disallow .*; #for security
pagespeed LoadFromFileRuleMatch allow \.css$;
pagespeed LoadFromFileRuleMatch allow \.jpe?g$;
pagespeed LoadFromFileRuleMatch allow \.jpe?g\?t=[0-9]+$;
pagespeed LoadFromFileRuleMatch allow \.png$;
pagespeed LoadFromFileRuleMatch allow \.js$;
pagespeed LoadFromFileRuleMatch allow \.svg$;
pagespeed LoadFromFileRuleMatch allow \.ttf$;
pagespeed LoadFromFileRuleMatch allow \.woff$;
pagespeed LoadFromFileRuleMatch allow \.eot$;
pagespeed LoadFromFileRuleMatch disallow .*;  #for security

pagespeed Disallow *abstract*;
pagespeed Disallow *foundry*;
pagespeed RewriteLevel CoreFilters;
pagespeed EnableFilters collapse_whitespace,remove_comments;


#  Ensure requests for pagespeed optimized resources go to the pagespeed
#  handler and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
        access_log off;
        add_header "" "";
}
location ~ "^/ngx_pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }
location /ngx_pagespeed_statistics { allow 127.0.0.1; deny all; }
location /ngx_pagespeed_global_statistics { allow 127.0.0.1; deny all; }
location /ngx_pagespeed_message { allow 127.0.0.1; deny all; }
location /pagespeed_console { allow 127.0.0.1; deny all; }

#end pagespeed

Maybe the issue is regarding the psol library, anyway I always used the binary psol matching the release number of ngx_pagespeed as suggested in your github README compile instructions.

@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented Jan 14, 2014

Thanks for the detailed bug report! This is fixed in mod_pagespeed trunk as of r3667, but we overlooked it when preparing the 1.7.30.2 patch release. We're going to need to get a new release out soon to fix this.

@creativeprogramming

This comment has been minimized.

Copy link

creativeprogramming commented Jan 14, 2014

Thanks!

@peterbowey

This comment has been minimized.

Copy link

peterbowey commented Jan 15, 2014

Thanks 'jeffkaufman' , I noticed the same issue (above).

@huibaolin

This comment has been minimized.

Copy link
Contributor

huibaolin commented Jan 15, 2014

Update the title to clarify the issue.

@nikolay

This comment has been minimized.

Copy link
Contributor

nikolay commented Jan 17, 2014

@jeffkaufman Does version 1.7.30.3-beta fix this?

@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented Jan 17, 2014

Yes.

@nikolay

This comment has been minimized.

Copy link
Contributor

nikolay commented Jan 17, 2014

@jeffkaufman Sorry, didn't see that. Thanks!

@creativeprogramming

This comment has been minimized.

Copy link

creativeprogramming commented Jan 19, 2014

I confirm, 1.7.30.3-beta fixes it. All is working well again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment