Problem/Motivation

There is a bug that the menu-item--active-trail if I add my home button into a menu. It looks like this:

<ul class="my-menu">
  <li class="menu-item">
    <a href="/drupal8/" data-drupal-link-system-path="<front>" class="is-active">Home</a>
   </li>
   <li class="menu-item">
     <a href="/drupal8/node-17-article" data-drupal-link-system-path="node/17">Test 1</a>
   </li>
</ul>

Other items have li.menu-item--active-trail class assigned.

<ul class="my-menu">
  <li class="menu-item">
    <a href="/drupal8/" data-drupal-link-system-path="<front>">Home</a>
   </li>
   <li class="menu-item menu-item--active-trail">
     <a href="/drupal8/node-17-article" data-drupal-link-system-path="node/17" class="is-active">Test 1</a>
   </li>
</ul>

Proposed resolution

Add the li.menu-item--active-trail class also to LI elements that contain Home links.

<ul class="my-menu">
  <li class="menu-item menu-item--active-trail">
    <a href="/drupal8/" data-drupal-link-system-path="<front>" class="is-active">Home</a>
   </li>
</ul>

Remaining tasks

User interface changes

Home links show with proper background color set in CSS.

API changes

None.

Data model changes

None.

Comments

hass created an issue. See original summary.

hass’s picture

Issue summary: View changes
hass’s picture

Issue summary: View changes
hass’s picture

Issue summary: View changes
star-szr’s picture

Component: theme system » menu system

Can we check that it's not a menu thing first, please?

hass’s picture

Sure. It more likely a menu bug.

mikeocana’s picture

Assigned: Unassigned » mikeocana

ill check this

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

toomanypets’s picture

toomanypets’s picture

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

legolasbo’s picture

Status: Active » Closed (duplicate)

Closing this as a duplicate of #1578832: Class active-trail not added to li element when linking to front page which has been around since 2012