- 🇩🇪Germany spuky
is this still an issue since preferred menu option is there just asking if thats an issue for users ?
- Status changed to Postponed: needs info
4 months ago 1:14pm 19 August 2024
if you have a node in multiple menus e.g. in main (added via "create menu item" in node) and in footer (manually added link to menu) and the menu titles differ, you sometimes get the "wrong" titles. i would expect to get the one which was added via node-edit, but sometimes it is the other.
the reason is because easy_breadcrump just gets all the $menu_links as and afterwards gets the first element from the array $menu_link = reset($menu_links); but the first maybe is not the correct one...
if ($this->config->get(EasyBreadcrumbConstants::USE_MENU_TITLE_AS_FALLBACK)) {
// Try resolve the menu title from the route.
$route_name = $route_match->getRouteName();
$route_parameters = $route_match->getRawParameters()->all();
$menu_links = $this->menuLinkManager->loadLinksByRoute($route_name, $route_parameters);
if (empty($menu_links)) {
....
}
else {
$menu_link = reset($menu_links);
$title = $this->normalizeText($menu_link->getTitle());
if (array_key_exists($title, $replacedTitles)) {
$title = $replacedTitles[$title];
}
if ($this->config->get(EasyBreadcrumbConstants::TRUNCATOR_MODE)) {
$title = $this->truncator($title);
}
}
}
Postponed: needs info
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
is this still an issue since preferred menu option is there just asking if thats an issue for users ?