When the action is "source", the static cache is populated incorrectly with:
$cache['map'][$path_language][$source] = $source = $cached->data;
This sets both the key and value to be the same, both $source.
It should be set to $source = $path.

CommentFileSizeAuthor
#1 source_static_cache-2442779-0.patch571 bytestheapi

Comments

theapi’s picture

StatusFileSize
new571 bytes
joelpittet’s picture

Status: Active » Needs review

This patch needs review but that makes sense...

davidgrayston’s picture

Status: Needs review » Reviewed & tested by the community

This patch is working well for me

It has resolved an issue where a path lookup by source would return the the source path instead of the alias – I could reproduce the problem that this patch fixes as follows:

// Where alias for 'taxonomy/term/123' is 'my-alias'.
$path = drupal_lookup_path('source', 'my-alias');
$alias = drupal_lookup_path('alias', 'taxonomy/term/123');

$alias will give you 'taxonomy/term/123' but should return 'my-alias'.

This will happen on the second page load

marcelovani’s picture

Patch tested. Good spot, it was bugging me for ages.

furamag’s picture

Patch works fine for me.

ianwesty’s picture

Just had the same issue as #3, patch worked perfectly!

litwol’s picture

Can we get a merge on this one? It's been tested and found to be solving a real problem existing over the past 2+ years.

What can we do to get a move on?

  • Fabianx committed 7e721c8 on 7.x-1.x
    Issue #2442779 by theapi, davidgrayston, joelpittet, marcelovani,...
fabianx’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 7.x-1.x.

Thank you!

Status: Fixed » Closed (fixed)

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