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

andreiashu’s picture

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.

andreiashu’s picture

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

andreiashu’s picture

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

Corrected the title

mustafau’s picture

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.

mikeytown2’s picture

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?

mikeytown2’s picture

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.

Status: Fixed » Closed (fixed)

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