Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

outline_javascript generating broken links #238

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 6 comments
Closed

outline_javascript generating broken links #238

GoogleCodeExporter opened this issue Apr 6, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

Occurs when mod_rewrite makes the document appear to be in a different 
directory and JavaScript is being 'outlined'.
e.g. RewriteRule ^([-a-z]+)/$ /scripts/category.html?shortname=$1

What is the expected output? What do you see instead?

The <script> src generated by the outline_javascript filter is only valid from 
the directory where the script is located.  From the re-written path the link 
is broken (404).

What version of the product are you using (please check X-Mod-Pagespeed
header)?
0.9.16.6-r555

On what operating system?
Debian GNU/Linux

Which version of Apache?
2.2.16

Which MPM?
    ModPagespeedDisableFilters inline_css,inline_javascript
    ModPagespeedEnableFilters move_css_to_head
    ModPagespeedEnableFilters rewrite_css,rewrite_javascript
    ModPagespeedEnableFilters outline_css,outline_javascript

Please provide any additional information below, especially a URL or an
HTML file that exhibits the problem.

http://www.capitalwines.com.au/ministry/
<script type="text/javascript" 
src="_,Mjo.KT-QvufXb4.js.pagespeed.jm.0nrvg_cYUr.js"></script>
link returns 404 Not Found.

http://www.capitalwines.com.au/scripts/category.html?shortname=ministry
<script type="text/javascript" 
src="_,Mjo.KT-QvufXb4.js.pagespeed.jm.0nrvg_cYUr.js"></script>
link works as expected.

So the outlined javascript only works when sourced from:
http://www.capitalwines.com.au/scripts/_,Mjo.KT-QvufXb4.js.pagespeed.jm.0nrvg_cY
Ur.js

But it is instead being sourced from (e.g.):
http://www.capitalwines.com.au/ministry/_,Mjo.KT-QvufXb4.js.pagespeed.jm.0nrvg_c
YUr.js

This behaviour appears to have started with the upgrade to 0.9.16 (not 
confirmed).

Original issue reported on code.google.com by dun...@chirp.com.au on 14 Mar 2011 at 10:04

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Update: resolved by disabling trim_urls:
<script type="text/javascript" 
src="http://www.capitalwines.com.au/scripts/_,Mjo.KT-QvufXb4.js.pagespeed.jm.0nr
vg_cYUr.js"></script>

Original comment by dun...@chirp.com.au on 14 Mar 2011 at 10:22

@GoogleCodeExporter
Copy link
Author

Disabling trim_urls fixed a drupal install for me, users couldn't add content 
anymore because urls got rewritten from domain.com/node/story/add to 
domain.com/node/node/story/add.

Drupal uses mod_rewrite for it's clean url option.

This was after upgrading from a previous release to the latest beta (r555)

Original comment by dale.hof...@gmail.com on 14 Mar 2011 at 11:40

@GoogleCodeExporter
Copy link
Author

We are hot on the trails of a fix.  Please stay tuned.

Original comment by jmara...@google.com on 14 Mar 2011 at 2:23

@GoogleCodeExporter
Copy link
Author

Original comment by jmara...@google.com on 14 Mar 2011 at 2:23

@GoogleCodeExporter
Copy link
Author

Fixed in 0.9.16.9

Original comment by jmara...@google.com on 17 Mar 2011 at 12:23

  • Changed state: Fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant