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...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

valderama’s picture

Status: Active » Needs review
FileSize
643 bytes

Here is the patch..

Spleshka’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs review » Fixed

This patch is not required for new branch 7.x-2.x. But thanks for your patch anyway!

Status: Fixed » Closed (fixed)

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

olofbokedal’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

I'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));

olofbokedal’s picture

Status: Active » Needs review
FileSize
1.63 KB

Here's a pretty straightforward patch that pretty much does the same thing as #1, modified for the latest dev.

Spleshka’s picture

Status: Needs review » Fixed

Nice catch, it seems good solution for me. Thanks for you patch, commited/pushed to 7.x-2.x.

Status: Fixed » Closed (fixed)

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

IRuslan’s picture

I have one question, why preload alias, instead of passing 'language' option to url() function directly?

Spleshka’s picture

Because we need both values: url alias (internal path) and full aliased url.