Closed (fixed)
Project:
Flush page cache
Version:
6.x-1.0-beta4
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Apr 2012 at 03:59 UTC
Updated:
30 Apr 2012 at 11:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
adrianmak commentedOn a multilanguage site when it will prefix a language code that the cause of returning a page not found
For example
http://www.mysite.com/jpn/node/16
When I did a flush page cache , it will go to http://www.mysite.com/jpn/jpn/node/16
of course.....a page not found.
Comment #2
adrianmak commentedJust reading the source code, the goto url is saved the current url that's why there is duplicated language prefix.
Comment #3
iamEAP commentedI think we should be using base_url rather than base_root to account for Drupal being under sub-directory. Solving that should solve the multilanguage site redirect issue.
Comment #4
jrockowitz commentedI agree that we need to account for the whole URL and path during a flush page cache request. So I isolated this information into two new helper functions called flush_page_cache_get_url() and flush_page_cache_get_path().
I also cleaned up the 'Clear custom cache cid and tables based on drupal path." code so that it uses the drupal_match_path() function which has full wildcard support.
Finally, I found a bug in the admin_settings table where it just was saving new values.
iamEAP, maybe I should just commit these changes to the 6.x-1.x and 7.x-1.x branches so that it will be easier to test.
Comment #5
iamEAP commentedI like the bug fixes there.
I feel like flush_page_cache_get_url() is still duplicating work core does for us (D7: drupal_settings_initialize, D6: conf_init).
I'm also not 100% sure parse_url handles the multilingual path prefixes (that this thread was about originally) very well, but I'll test in the morning.
Comment #6
jrockowitz commentedActually my code changes are trying to bypass core's handling of URLS because several core and contributed modules mess with these parameters during the process of loading and rendering the page, meanwhile no one tends to touch $_SERVER variables via request_uri().
Comment #7
iamEAP commentedWorks for me.
I might change the re-wording in the example, but otherwise, I like the changes.
To maybe...
Comment #8
jrockowitz commentedThat text was takens from block module's block_admin_configure() and I forgot to include the $t_args which include the paths and front pages link.
Thanks for catching that.
Comment #9
jrockowitz commentedhttp://drupalcode.org/project/flush_page_cache.git/commit/6202574