Closed (fixed)
Project:
Cache Expiration
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2012 at 16:45 UTC
Updated:
3 Mar 2013 at 12:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
pbuyle commentedComment #2
halcyonCorsair commentedComment #3
halcyonCorsair commentedDuplicate/more info over on #1471656: Front page expiration fails both for new and updated content.
Comment #4
anavarreJust tested patch in #1. Content is now correctly updated in the front page, whether it's a new or updated content. Individual pages are looking very fine as well.
Comment #5
anavarreComment #6
halcyonCorsair commentedI'll take a look at this during the weekend, and hopefully commit it.
Comment #7
kim.pepperI have tested this patch and confirm it works for me.
Comment #8
halcyonCorsair commentedIt has been pointed out to me that using base_path() (http://api.drupal.org/api/drupal/includes!common.inc/function/base_path/7) instead of '/' is more correct here.
e.g.
Comment #9
tekante commentedAdjustment to patch in #1 based on commentary in #8
Comment #10
fizk commentedPlease commit the fix.
The "Include base URL in expires" option is enabled by default, so this issue shows up in the default use case.
Comment #11
halcyonCorsair commentedI will work on this and some of the other open issues tomorrow.
Comment #12
halcyonCorsair commentedFixed in dev.
Comment #13
unkn0wn commentedNow i see in nginx logs:
127.0.0.1 - - [28/May/2012:05:56:27 +0400] "PURGE /node/826929 HTTP/1.1" 200 0 "-" "-"
127.0.0.1 - - [28/May/2012:05:56:27 +0400] "PURGE /taxonomy/term/1643 HTTP/1.1" 200 0 "-" "-"
127.0.0.1 - - [28/May/2012:05:56:27 +0400] "PURGE /ttp://dcom.ru/node/826929 HTTP/1.1" 200 0 "-" "-"
Where is "h" letter in http and and is "http://" prefix really needed?
Also i have e-store with 13 subdomains for different languages. Product descriptions translated via Content Translation module. I have no use Domain Access, i simply define different domain for each language in 'Detection and Selection'. But expire module cannt handle this feature, as result expire provide path alias for general language and /node/XXXXXX for all other languages, so only general language flushed from cache. I even try to install Domain Access and create two subdomains for test, but it's really trouble for me: i have ~300.000 nodes, and each node i must link to domain.
Comment #14
mrfelton commentedThe fix that was committed was incorrect. $base_url includes everythign but the trailing slash. If you have your site in a subdirectory, $base_url will be http://example.com/directory and $base_path will be
/directory/. With the code that was committed, this will result in expire urls likehttp://example.com/directory/directory/, which is wrong.This module should be appending a trailing slash to the base url, and not the entire base_path, since the base path is already included in base_url (minus the trailing slash). Patch attached.
Also, the global really should be defined at the top of the function. Patch resolves.
Comment #15
nicholasthompsonHow about just using
url()with the absolute option? That way the tried-and-tested Drupal Core system handles it? IMHO I think we should be usingurl()in more places rather than the global $base_path and $base_url variables.Comment #16
manos_ws commentedI confirm that both #14 and #15 work.
Without fixing this I cant use the module.
Please review this and commit it
Comment #17
anavarreOk, so should we settle on $base_url . '/'; for now and move forward?
Comment #18
heddnre-rolled #15 and removed the un-needed global $base_url
Comment #19
kim.pepperComment #20
pgrond commentedIt is still not always correct in a multilingual site. I added a simple line that makes sure there is always 1 / at the end of the string.
Comment #21
heddn@pgrond, I don't see where the new line that was inserted ever is read. Is this patch missing some code? Can you explain how/why the earlier fix isn't effective on multi-lingual sites?
Comment #22
pgrond commentedI'm sorry, I also posted another patch (issue http://drupal.org/nonde/1728652). The complete code is:
The / is not added correctly all the time. Did not debug in detail but this line ensures there is one slash at the end of the base path.
Comment #23
jemond commentedI can confirm this patch works in production. I think the url()/absolute method is more maintainable than the slash append approach, so this patch looks good to me.
Comment #24
heddnRolled #22 into a patch. RTBC once again.
Comment #25
jemond commentedApologies, I was reporting that the patch in #20 was working, not #22.
Comment #26
SqyD commentedOk... I am committing the patch in #24. It looks fine to me... Thanks all!
Comment #27
SqyD commentedcomitted to 7.x-1.x. Thanks all involved!