Hi, sorry for my English.
I found error. then i using node breadcrumb page title not work. Page title use only default token.
Hi, sorry for my English.
I found error. then i using node breadcrumb page title not work. Page title use only default token.
Comments
Comment #1
edhel commentedDo you mean problem with combination pathautho and node breadcrumb modules?
Comment #2
afanasyevsanya commentedNo.
If i add rules for content type "xxxx" and attach it to menu item "yyyy", then page title work bad.
I found error in this code (page title):
// Node (either node or comment reply)
if ((arg(0) == 'node' && is_numeric(arg(1))) || (arg(0) == 'comment' && arg(1) == 'reply' && is_numeric(arg(2)) && module_exists('comment')) ) {
$types['node'] = menu_get_object();
$page_title_pattern = variable_get('page_title_type_'. $types['node']->type, '');
}
menu_get_object() - return NULL
Comment #3
edhel commentedwrite this in russian)
напиши по-русски, я нихера не понял)
Comment #4
afanasyevsanya commented:D
Как выловить ошибку:
Создаём тип контента "магазин". Создаём меню "Магазин". С помощью node breadcrumb привязываем тип контента "магазин" к меню "магазин". Создаём правило создания заголовка page title для типа контента "магазин". Создаём новый нод "магазин". Смотрим заголовок - он не правильный. Применилось правило по умолчанию page title.
Ошибка происходит в этом коде модуля page title:
// Node (either node or comment reply)
if ((arg(0) == 'node' && is_numeric(arg(1))) || (arg(0) == 'comment' && arg(1) == 'reply' && is_numeric(arg(2)) && module_exists('comment')) ) {
$types['node'] = menu_get_object();
$page_title_pattern = variable_get('page_title_type_'. $types['node']->type, '');
}
menu_get_object() - return NULL
Вот...
Comment #5
edhel commentedВо, про модуль page_title надо было сразу и писать.
Могу только предложить чуток пофиксить page_title.module. Заменить в функции page_title_page_get_title() строчку:
$types['node'] = menu_get_object();
на:
$types['node'] = is_numeric(arg(1)) ? node_load(arg(1)) : menu_get_object();
Это же по-английски, может кому-нибудь пригодится.
---------------- In english ----------------
You can make small fix in page_title.module file. Change at page_title_page_get_title() function line:
$types['node'] = menu_get_object();
to:
$types['node'] = is_numeric(arg(1)) ? node_load(arg(1)) : menu_get_object();