When editing a (let's say) german node, usally the edit URL is de/node/123/edit - However the same node can be edited via node/123/edit - without the language prefix.
When the expire pathes are created, the url() function is called without passing a language, which means that the "current language" is used. This language might not be correct language to actually find the alias. In my concrete example: When I edit the node via node/123/edit, expire does not find the correct alias (and the node page does not get purged from varnish).
A patch follows...
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | expire-alias_language-1978642-5.patch | 1.63 KB | olofbokedal |
Comments
Comment #1
valderama commentedHere is the patch..
Comment #2
spleshkaThis patch is not required for new branch 7.x-2.x. But thanks for your patch anyway!
Comment #4
olofbokedal commentedI'm using the latest 7.x-2.x-dev but the alias lookup doesn't work when an alias is being stored with a language code.
The conversion is still happening by calling
url($path, array('absolute' => TRUE));Comment #5
olofbokedal commentedHere's a pretty straightforward patch that pretty much does the same thing as #1, modified for the latest dev.
Comment #6
spleshkaNice catch, it seems good solution for me. Thanks for you patch, commited/pushed to 7.x-2.x.
Comment #8
IRuslan commentedI have one question, why preload alias, instead of passing 'language' option to url() function directly?
Comment #9
spleshkaBecause we need both values: url alias (internal path) and full aliased url.