Hello and thanks for this theme,

Problem/Motivation

When I use this theme with Easy Breadcrumb module, the last item of the breadcrumb trail duplicates.

Steps to reproduce

  1. Install Mahi theme
  2. Install Easy Breadcrumb module
  3. Activate breadcrumb block

Proposed resolution

I've just commented out the code below, but there could better be a check for the user's settings and module installations too.

/* *
//  * Add current page to breadcrumb.
//  */
// function mahi_preprocess_breadcrumb(&$variables) {
// 	$request = \Drupal::request();
// 	$route_match = \Drupal::routeMatch();
// 	$page_title = \Drupal::service('title_resolver')->getTitle($request, $route_match->getRouteObject());
// 	if (!empty($page_title)) {
// 		$variables['breadcrumb'][] = [
// 			'text' => $page_title,
// 		];
// 		// Add cache context based on url.
// 		$variables['#cache']['contexts'][] = 'url';
// 	}
// }

Best,
Orkut

Comments

Orkut Murat Yılmaz created an issue. See original summary.

orkutmuratyilmaz’s picture

StatusFileSize
new1021 bytes

I'm also adding my temporary fix as a patch here, in order to deal with my composer.json file.

brahmjeet789’s picture

StatusFileSize
new151.07 KB
new155.04 KB

@orkut murat yılmaz yes i can see the title appear twice when we are using easybreadcrumb with this theme ,but if we are not using any breadcrumb module because breadrumbs are already there in theme so i guess we dont require two breadcrumbs.

brahmjeet789’s picture

Status: Active » Postponed
orkutmuratyilmaz’s picture

Version: 1.0.15 » 1.1.2