Closed (fixed)
Project:
Path Breadcrumbs
Version:
7.x-2.0-beta9
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2012 at 11:23 UTC
Updated:
19 Jun 2012 at 14:55 UTC
my drupal installation locates in
http://localhost/dirname/
First homepage link hrefs to http://localhost/dirname//dirname/
russian:
Привет (: Спасибо большое за модуль, действительно крут. Но вот такая проблема, если папка с друпалом лежит не в корне сервера, а в папке dirname, то в хлебных крошках ссылка, которая должна вести на главную, ведёт на http://localhost/dirname//dirname/
Пробовал переписать в .htaccess
Rewriterule /dirname
но безрезультатно.
Даже когда отключаю принудительный вывод главной и вывожу руками первой ссылкой
<front>
то результат тот же самый.
UPD: Когда использую стандартный рендерер хлебных крошек - всё работает, но не работает замена разделителя ):
Comments
Comment #1
spleshkaHi,
I think this is not a module bug. Open your settings.php and provide there correct $base_url.
russian:
Проблема не в модуле. Открой settings.php и укажи там правильный $base_url, после чего сбрось кэш.
Comment #2
alexander_danilenko commentedtryed to set $base_url to
http://localhost/dirnamebut it was not resolved problem. tryed to set
http://site.ru/asdbut in breadcrumb home link hrefs to
http://site.ru/asd//asd/maybe bug in module?
russian:
Попробовал поправить $base_url на
http://localhost/dirnameно проблемы не решило. попробовал заменить на
http://site.ru/asdно ссылка в хлебных крошках всё ровно ведёт на
http://site.ru/asd//asd/Может всё таки баг в модуле? (:
Comment #3
spleshkaI digged deeper - you right, this is module bug.. OK, I will search for a solution.
russian:
Да, взглянул более внимательно - действительно в модуле. Буду искать решение, там довольно неоднозначный баг.
Comment #4
kalabroCan't reproduce on latest dev
Comment #5
spleshkaI think that bug is still exists even in the latest dev. See line 250 in path_breadcrumbs.module.
Comment #6
kalabroHmm..
l()called twice.Comment #7
spleshkaNo, l() called once. But if $href contains URL like /dirname/node/1 preg_match() will get this url and then this URL will be provided to l() again. So I see problem in preg_match().
Comment #8
kalabrol()adds $base_url to href automatically here. We are parsing it and callingl()a second time, so we have 2 $base_url's in href.Comment #9
spleshkaExactly. But I have to parse link because I should provide rich snippers for all breadcrumbs (even if they were generated not by my module). But I hope that I found a solution: see hook_menu_breadcrumb_alter(). I hope that I able to change current theming function to this one and remove preg_match() at all.
Comment #10
kalabroIf you succeed, it will be more flexible. I will follow anyway :)
Comment #11
spleshkaUnfortunately I am wrong, see drupal_get_breadcrumb: menu_get_active_breadcrumb() called only if there are no breadcrumbs on the page... So we still have to search for a better solution.
Comment #12
kalabroI think, #6 can be temporary fix for someone
Comment #13
spleshkayep. It is good as temporary but not as permanent solution.
Comment #14
spleshkaPermanent solution found. Commited at e6738bd. Thanks all for your time.