I don't see any files in files/advagg_* and pay attention to the double "fr" in [content_location] line

stdClass Object (
[request] => GET /fr/sites/default/files/advagg_css/css_missing2928151681324112848_0.css HTTP/1.0
Host: guides-israel.com
User-Agent: Drupal (+http://drupal.org/)
Connection: close

[data] =>
404 Not Found
Not Found

The requested URL was not found on this server.

Home


[protocol] => HTTP/1.1
[status_message] => Not Found
[headers] => Array (
[Server] => Apache
[X-Powered-By] => PHP/5.3.3-7+squeeze3
[Cache-Control] => public, max-age=900
[Last-Modified] => Sat, 17 Dec 2011 09:07:28 +0000
[Expires] => Sun, 11 Mar 1984 12:00:00 GMT
[Vary] => Cookie,Accept-Encoding
[Content-Location] => http://guides-israel.com/fr/fr/sites/default/files/advagg_css/css_missin...
[X-AdvAgg] => Failed Validation. Wrong Pattern.
[Web-Head] => vps156.advomatic.com
[Content-Type] => text/html; charset=utf-8
[Content-Length] => 307
[Date] => Sat, 17 Dec 2011 09:07:29 GMT
[X-Varnish] => 2107914897
[Age] => 0
[Via] => 1.1 varnish
[Connection] => close
)
[error] => Not Found
[code] => 301
[redirect_code] => 404
[redirect_url] => http://guides-israel.com/fr/sites/default/files/advagg_css/css_missing29...
[timer] => Array (
[count] => 1
[time] => 1218.37
)
)

Comments

mikeytown2’s picture

/fr/sites/default/files/advagg_css/ Redirected to /fr/fr/sites/default/files/advagg_css/, Is that correct? In reality the path should be /sites/default/files/advagg_css/, Is this correct?

this css_missing2928151681324112848_0.css is a test to make sure the AdvAgg callback is working; and it appears to due to this header [X-AdvAgg] => Failed Validation. Wrong Pattern. in the output.

Does imagecache work on your server? How does it work for you?

heyyo’s picture

Thanks for your fast answer !

/fr/sites/default/files/advagg_css/ Redirected to /fr/fr/sites/default/files/advagg_css/, Is that correct? In reality the path should be /sites/default/files/advagg_css/, Is this correct?

I modified a lot my main htacces, I will switch to vanilla one to see if it's the problem.

Does imagecache work on your server? How does it work for you?

Good question ! All my imagecache ares generated I see all of them, but I tested yesterday the fast404 module, with the settings "Deny Imagecache generation URLs to anonymous", I soon as I did this all my imagecache wasn't available for anonymous.

In few minutes I will report with new .htaccess.

heyyo’s picture

I revert back my htaccess file to a vanilla pressflow one, but I have still the same behavior.

But maybe it's related to my modification of includes/language.inc file to insert "language" in path even for default language.
On my website, french is default, and I wanted to add "fr" to each url.

http://blog.mesijan.com/drupal-%E2%80%93-force-path-prefix-for-default-l...

How could I test my imagecache ?

heyyo’s picture

/fr/sites/default/files/advagg_css/ Redirected to /fr/fr/sites/default/files/advagg_css/, Is that correct? In reality the path should be /sites/default/files/advagg_css/, Is this correct?

Yes it's correct. Do you have any idea why the language appears in the path ?

mikeytown2’s picture

The function that generates the URLs in AdvAgg is advagg_build_uri(). My guess is something is implementing hook_file_url_alter and adding fr to it. The other option is base_path() is getting modified. If you look at "20 functions call base_path()" section you see that a lot of them are CSS/JS functions in core, so if your having issues here, core might have the same issues as well.

heyyo’s picture

I did rgrep 'file_url_alter' . it retiurns me only advagg.module file and a comment inside imagecache.module
So it doesn't seem to be the problem.

But seems related to my previous assumption:

But maybe it's related to my modification of includes/language.inc file to insert "language" in path even for default language. On my website, french is default, and I wanted to add "fr" to each url.

http://blog.mesijan.com/drupal-%E2%80%93-force-path-prefix-for-default-l...

Do you know a better way to add language prefix even for default language ?
I don't want to remove it for a question of seo...

To be sure I will enable your module on another multilang website(on the same server but without varnish) where I didn't modified the language.inc

heyyo’s picture

I have finally tested the same website on my localhost.

I found 2 ways to add prefix language even for the default drupal language path:

  • With the modification in language.inc and when the default language is set with a prefix set.
  • In admin/settings/language/configure check "Path prefix with language fallback" (and no need to modify core)

In both case I had the problem mentionned in previous post, even with the second option where Drupal core is not modified.

When using in admin/settings/language/configure check "Path prefix only" (so urls in default language are without language prefix)

I have the folowing

stdClass Object (
    [request] => GET /sites/default/files/advagg_css/css_missing17832270551324128489_0.css HTTP/1.0
Host: rimonim-israel.com
User-Agent: Drupal (+http://drupal.org/)
Connection: close

    [data] => <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><p><a href="/">Home</a></p><!-- advagg_missing_fast404 --></body></html>
    [protocol] => HTTP/1.0
    [status_message] => Not Found
    [headers] => Array (
            [Date] => Sat, 17 Dec 2011 13:28:09 GMT
            [Server] => Apache/2.2.17 (Ubuntu)
            [X-Powered-By] => PHP/5.3.5-1ubuntu7.3
            [Cache-Control] => public, max-age=86400
            [Last-Modified] => Sat, 17 Dec 2011 13:28:09 +0000
            [Expires] => Sun, 11 Mar 1984 12:00:00 GMT
            [Vary] => Cookie,Accept-Encoding
            [ETag] => "1324128489"
            [Content-Location] => http://rimonim-israel.com/sites/default/files/advagg_css/css_missing17832270551324128489_0.css
            [X-AdvAgg] => Failed Validation. Wrong Pattern.
            [Content-Length] => 307
            [Connection] => close
            [Content-Type] => text/html; charset=utf-8
        )
    [error] => Not Found
    [code] => 404
    [timer] => Array (
            [count] => 1
            [time] => 504.3
        )
)

Is it what I need to have ?

mikeytown2’s picture

That debug code looks correct

udvranto’s picture

I have similar problem. The English site does not generate/load the aggregated JS/CSS, where as the Bengali site does.

Bengali config (working)

stdClass Object (
    [request] => GET /files/advagg/default/advagg_css/css_missing6361046621330643431_0.css HTTP/1.0
Host: www.sachalayatan.com
User-Agent: Drupal (+http://drupal.org/)
Connection: close

    [data] => <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><p><a href="/">Home</a></p><!-- advagg_missing_fast404 --></body></html>
    [protocol] => HTTP/1.1
    [status_message] => Not Found
    [headers] => Array (
            [Server] => Apache/2.2.16 (Debian)
            [X-Powered-By] => PHP/5.3.3-7+squeeze3
            [X-Drupal-Cache] => MISS
            [Last-Modified] => Thu, 01 Mar 2012 23:10:31 +0000
            [Cache-Control] => no-cache, must-revalidate, post-check=0, pre-check=0
            [ETag] => "1330643431"
            [X-AdvAgg] => Failed Validation. Wrong Pattern.
            [Vary] => Accept-Encoding
            [Content-Type] => text/html; charset=utf-8
            [Content-Length] => 307
            [Date] => Thu, 01 Mar 2012 23:10:31 GMT
            [X-Varnish] => 1803211003
            [Age] => 0
            [Via] => 1.1 varnish
            [Connection] => close
            [X-Varnish-Cache] => MISS
        )
    [error] => Not Found
    [code] => 404
    [timer] => Array (
            [count] => 1
            [time] => 66.18
        )
)

English config (not working)

stdClass Object (
    [request] => GET /files/advagg/en.sachalayatan.com/advagg_css/css_missing3739897571330643168_0.css HTTP/1.0
Host: en.sachalayatan.com
User-Agent: Drupal (+http://drupal.org/)
Connection: close

    [data] => <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta property="og:image" content="http://www.sachalayatan.com/files/logo.jpg" />
<meta property="og:type" content="blog" />
<meta property="fb:app_id" content="132191546816333" />
<script type="text/javascript">
function mUnsel(n){if(n.nodeType==1)
n.unselectable=true;var c=n.firstChild;while(c){mUnsel(c);c=c.nextSibling;}}
function dSel(t){if(typeof t.onselectstart!="undefined")
t.onselectstart=function(){return false;};else if(typeof t.style.MozUserSelect!="undefined")
t.style.MozUserSelect="none";else t.onmousedown=function(){return false;};t.style.cursor="default";}
function dCtx(t){t.oncontextmenu=function(){return false;};}
function hMouse(e){var evt=(e==null?event:e);if(evt.type!='mousedown')return true;if(evt.which&&evt.which==3)return false;else if(evt.button&&evt.button==2)return false;return true;}
document.onmousedown=hMouse;document.onmouseup=hMouse;document.onclick=hMouse;
</script>
<title>Page not found | Sachalayatan</title>
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta property="og:title" content="Sachalayatan"/>
<meta property="og:site_name" content="Sachalayatan"/>
<meta property="fb:app_id" content="132191546816333"/>
<link rel="shortcut icon" href="/sites/all/themes/burnt/favicon.ico" type="image/x-icon" />
<link type="text/css" rel="stylesheet" media="all" href="/files/advagg/en.sachalayatan.com/advagg_css/css_8f817f92804db5939ea286365601c18c_0.css" />
<link type="text/css" rel="stylesheet" media="all" href="/files/advagg/en.sachalayatan.com/advagg_css/css_ca751d93e8f2307348f37c5ec8b29c86_0.css" />
<link type="text/css" rel="stylesheet" media="all" href="/files/advagg/en.sachalayatan.com/advagg_css/css_bf4c989fcfdd021fd4edfe72f6e96bed_0.css" />
<link type="text/css" rel="stylesheet" media="all" href="/files/advagg/en.sachalayatan.com/advagg_css/css_cf4587d29062dec7df5cf6f042f7e1cc_13.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript" src="/files/advagg/en.sachalayatan.com/advagg_js/js_52ae9b20d07a214cf2b5eb3bbd675899_0.js"></script>
<script type="text/javascript" src="/files/advagg/en.sachalayatan.com/advagg_js/js_f5ec41576b52ad21bf7b3484a75f2ffd_0.js"></script>
<script type="text/javascript" src="/files/advagg/en.sachalayatan.com/advagg_js/js_9bf7278dac1d9c1b647551fa314a5cbd_0.js"></script>
<script type="text/javascript" src="/files/advagg/en.sachalayatan.com/advagg_js/js_40aac1cb1806cacc5cd856a93a481228_0.js"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, {"basePath":"\/","fivestar":{"titleUser":"Your rating: ","titleAverage":"Average: ","feedbackSavingVote":"Saving your vote...","feedbackVoteSaved":"Your vote has been saved.","feedbackDeletingVote":"Deleting your vote...","feedbackVoteDeleted":"Your vote has been deleted."},"googleanalytics":{"trackOutgoing":1,"trackMailto":1,"trackDownload":1,"trackDownloadExtensions":"7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip"},"nice_menus_options":{"delay":"800","speed":"fast"},"facebook_status":{"autofocus":false,"noautoclear":false,"maxlength":"250","hideLength":"100","refreshLink":false}});
//--><!]]>
</script>
<script type="text/javascript"> </script>
</head>
<!--oncontextmenu="return false;"-->
<body>
<div id="container">
<div id="header">
<div id="banner" style="background:url(http://en.sachalayatan.com/system/files/banners/banner_010312.jpg);">
</div>
<div id="banner-credit">
<div id="copyright">sachalayatan.com | Online Writers Community | Copyright © 2006-2012</div>
<div id="banner-author">Banner: 
<a href="/user/pranabesh"> উজানগাঁ </a> | ভারত বনধ              
 | <a href="http://www.sachalayatan.com/sondesh/42410">Reaction</a></div>
</div>          	 
</div>
<div id="content"  class="fullnode" >
<h1 class="title">Page not found</h1>
<div class="tabs"></div>
<div id="content-top">
</div>
The requested page could not be found.</div>
<div id="footer">	  
  <div class="block block-block" id="block-block-17">
    <h2 class="title"></h2>
    <div class="content">প্রকাশিত লেখা ও মন্তব্যের দায় একান্তই সংশ্লিষ্ট লেখক বা মন্তব্যকারীর, সচলায়তন কর্তৃপক্ষ এজন্য কোনভাবেই দায়ী নন</div>
 </div>
  <div class="block block-block" id="block-block-16">
    <h2 class="title"></h2>
    <div class="content">লেখকের এবং মন্তব্যকারীর লেখায় অথবা প্রোফাইলে পরিষ্কারভাবে লাইসেন্স প্রসঙ্গে কোন উল্লেখ না থাকলে স্ব-স্ব লেখার এবং মন্তব্যের সর্বস্বত্ব সম্পূর্ণভাবে সংশ্লিষ্ট লেখকের বা মন্তব্যকারী কর্তৃক সংরক্ষিত থাকবে। লেখকের বা মন্তব্যকারীর অনুমতি ব্যতিরেকে লেখার বা মন্তব্যের আংশিক বা পূর্ণ অংশ কোন ধরনের মিডিয়ায় পুনঃপ্রকাশ করা যাবে না।</div>
 </div>
</div>
<script type="text/javascript" src="/files/advagg/default/advagg_js/js_5741ab524448f99c17486372ca65f440_0.js"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, {"googleCSE":{"language":"en"}});
//--><!]]>
</script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
var _gaq=_gaq||[];_gaq.push(["_setAccount","UA-11727709-1"]);_gaq.push(["_setDomainName",".en.sachalayatan.com"]);_gaq.push(["_trackPageview","/404.html?page="+document.location.pathname+document.location.search+"&from="+document.referrer]);(function(){var ga=document.createElement("script");ga.type="text/javascript";ga.async=true;ga.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga,s);})();
//--><!]]>
</script>
</div>
</body>
</html>
    [protocol] => HTTP/1.1
    [status_message] => Not Found
    [headers] => Array (
            [Server] => Apache/2.2.16 (Debian)
            [X-Powered-By] => PHP/5.3.3-7+squeeze3
            [X-Drupal-Cache] => MISS
            [Last-Modified] => Thu, 01 Mar 2012 23:06:08 +0000
            [Cache-Control] => public, max-age=10800
            [ETag] => "1330643168-0"
            [Expires] => Sun, 11 Mar 1984 12:00:00 GMT
            [Vary] => Cookie,Accept-Encoding
            [X-PF-Uncompressing] => 1
            [Content-Type] => text/html; charset=utf-8
            [Content-Length] => 6872
            [Date] => Thu, 01 Mar 2012 23:06:08 GMT
            [X-Varnish] => 1803209447
            [Age] => 0
            [Via] => 1.1 varnish
            [Connection] => close
            [X-Varnish-Cache] => MISS
        )
    [error] => Not Found
    [code] => 404
    [timer] => Array (
            [count] => 1
            [time] => 65.35
        )
)
mikeytown2’s picture

Category: bug » support
Status: Active » Fixed

#9 is a duplicate of #1468934: Does not work with sub-domains.

Going to mark this issue as a support request that has been fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.