Download & Extend

boost_cache_set not getting the correct url alias

Project:Boost
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hey, i just started using boost (the 6.x.1.0-alpha1 version) and i think that i'm doing something wrong here. I have pathauto installed, all the urls are aliased, but in boost_init for any url like "http://mywebsrv/alias_name", $_GET['q'] returns something like "node/nid".
I'm using apache2, php 5. I verified in the {system} table: boost has the lowest weight value (-90) so it gets called first.
Any ideas ?

Thanks,
andreiashu

Comments

#1

Title:$_GET['q'] is node/#nid even with pathauto» boost_cache_set not getting the url alias
Status:active» postponed (maintainer needs more info)

Oki, i just realized how stupid i was.
The problem is that in "boost_cache_set" function both 'drupal_get_path_alias' and 'drupal_get_normal_path' return the same path - 'node/nid' when in fact drupal_get_path_alias should return the alias of the node...
I'll digg into this more and i'll post the results here.

#2

Oki, i think i found what the problem was: in a multilanguage site you must pass the current lang path to 'drupal_get_path_alias' and 'drupal_get_normal_path' functions.
So instead of:

$alias = drupal_get_path_alias($path);
$path = drupal_get_normal_path($path); // normalize path

the code should look like this:
$lang_prefix = language_initialize()->prefix ? language_initialize()->prefix : '';
$alias = drupal_get_path_alias($path, $lang_prefix);
$path = drupal_get_normal_path($path, $lang_prefix); // normalize path

At least for me it works. Please tell me if this makes any sense to you.
Thanks

#3

Title:boost_cache_set not getting the url alias» boost_cache_set not getting the correct url alias

Corrected the title

#4

Version:6.x-1.0-alpha1» 6.x-1.x-dev

I believe this is duplicate of another issue; #326241: db_set_active().
Suggested fix in this issue does not work for me. I am getting a WSOD after passing current lang to 'drupal_get_path_alias' and 'drupal_get_normal_path' functions.

#5

Status:postponed (maintainer needs more info)» needs review

Can anyone here who reported the error tryout the latest dev to see if that fixes this error?

#6

Status:needs review» fixed

Fairly sure #174380: Remove symlink creation. Let each path have own file fixed this reported error. Reopen if I'm mistaken.

#7

Status:fixed» closed (fixed)

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

nobody click here