D8 explanation:

I've installed bootstrap 8.x-3.x on a multilanguage site, but in the default main menu the home link is never active, when I'm in the home page the claass="is-active" won't appear.
This doesn't just occur with bootstrap though, it's a core issue.
See screenshots:

Active class missing (illustration)

active class missing

Active After Applying Active Class

Active Property after applying active

D7 explanation:

There is a bug with the "active-trail" class not showing up on <li> for menu items with Drupal 7.14. The problem is that "active-trail" is missing for a menu link to the front page (path "<front>"), all other links have "active-trail" just fine.

The situation is also slightly different for the horizontal primary link tabs that can be switched on from theme settings Toggle display - Main menu, than they are for the vertical navigation in the Main menu block. In the horizontal tabs the front page <li> has "active" but not "active-trail". So "active" could be used to do get around this issue for horizontal menus. But unfortunately if you want the vertical menu, there is no "active" nor "active-trail".

I verified that both "active" and "active-trail" are missing with a fresh install without any added modules on Drupal 7.4 to 7.14. The behaviour is identical with Bartik, Garland and Stark themes, as well as Zen.

Steps to reproduce:

1. Create a fresh install of Drupal 7.14.
2. On the front page go to Structure -> Blocks.
3. Move "Main menu" block to "First sidebar"
4. Create a new "Basic page" with test content and click "Provide a menu link" -> "Parent item" [Main menu]
5. Use e.g. Firebug to verify that the newly created test page link on the sidebar has "active-trail" on <li> but "Home" does not.

Attached is a patch that fixes the bug by adding special handling for the front page when adding the active-trail class. A better solution would be to get the 'in_active_trail' variable correctly set for links to <front>, but unfortunately I could not find out how to do that.

CommentFileSizeAuthor
#66 active_class_missing.png189.63 KBjoseph.olstad
#66 active_propert_after_applying_active class.png188.27 KBjoseph.olstad
#64 D8.9.x-menu_class_active_trail-1578832-64.patch2.07 KBjoseph.olstad
#64 D9.0.x-menu_class_active_trail-1578832-64.patch2.04 KBjoseph.olstad
#58 Screenshot 2019-05-10 at 6.29.17 PM.png43.73 KBadamtong
#54 menu-class-active-trail-1578832-54.patch2.22 KBlukassykora
#52 menu-class-active-trail-1578832-52.patch2.07 KBpdenooijer
#46 1578832-46.patch1.91 KBlegolasbo
#46 interdiff-43-46.txt489 byteslegolasbo
#43 1578832-43.patch1.86 KBlegolasbo
#20 core-fix_missing_active_trail-1578832-20.patch573 bytesjenlampton
#20 core-fix_missing_active_trail-1578832-20-do-not-test.patch553 bytesjenlampton
#8 fix_missing_active_trail_v4.patch1.15 KBttiurani
#3 fix_missing_active_trail_v3.patch1.14 KBttiurani
#1 fix_missing_active_trail_v2.patch1.14 KBttiurani
fix_missing_active_trail.patch1.04 KBttiurani

Issue fork drupal-1578832

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ttiurani’s picture

Attached is v2 of the patch, which is better because it does the special case handling in the place the 'in_active_trail' variable is set. With this patch caching works like it should.

ttiurani’s picture

There seems to be a bigger problem on menu.inc than just the missing "active-trail". I stumbled on a second problem when trying to create a submodule on menu_block which hides inactive menu items. Setting 'hidden' to TRUE works great for every other link except the one(s) pointing to <front>. The variable change just doesn't stick - it turns back to FALSE right after I set it. I also don't think menu_block is to blame because it doesn't do anything to the 'hidden' variable.

I found one place which is clearly wrong in menu.inc starting from line 2468:

    $path_candidates = array();
    // 1. The current item href.
    $path_candidates[$item['href']] = $item['href'];
    // 2. The tab root href of the current item (if any).
    if ($item['tab_parent'] && ($tab_root = menu_get_item($item['tab_root_href']))) {
      $path_candidates[$tab_root['href']] = $tab_root['href'];
    }
    // 3. The current item path (with wildcards).
    $path_candidates[$item['path']] = $item['path'];
    // 4. The tab root path of the current item (if any).
    if (!empty($tab_root)) {
      $path_candidates[$tab_root['path']] = $tab_root['path'];
    }

The problem is that none of these will find a link to <front>. When I add a fifth condition like this:

    // 5. 'node' matches <front>
    if ($item['path'] == 'node'){
    	$path_candidates['<front>'] = '<front>';
    }

I get a little bit further, but not too much because in menu.inc there is a lot of $map = explode('/', $path); which do not work with <front> which has path 'node'.

So the bug seems to be quite a lot bigger than I anticipated.

ttiurani’s picture

I fixed my new problem with 'hidden' not sticking by using references to values (i.e. added a few ampersands). But I don't understand why the problem was only with links to the front page and not all links.

Attached is version 3 of the patch. It is against the 7.x branch and does not have tabs or whitespace problems.

The fix isn't perfect as this only adds "active-trail" to the vertical menu, not the horizontal primary links tabs.

I hope this patch will be applied or a better solution is found to new 7.x versions.

kristofferwiklund’s picture

Status: Active » Reviewed & tested by the community

I had the same problem. When change the menu linking for "Home" link from node/6 to the li lost it's active-trail that was used for styling. After applied the patch everything worked as it should.

Might not be the best solution to special case but I don't know if there is any other way.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, fix_missing_active_trail_v3.patch, failed testing.

gagarine’s picture

I think is why using

menu_set_active_trail('my-menu','<front>')

Fail and make the menu block disappear.

I don't understand the tests than fail but we need to add some test for this patch anyway.

CowTownFarmBoy’s picture

I have this problem and am wondering if the proposed patch is really a fix or does it fail in other places. If someone is watching this is this fixed or not?

TIA

ttiurani’s picture

Attached is a fourth version of the patch with a trivial "isset($item['link_path'])" addition that should make the patch pass those tests. I don't know how to run (or write new) tests, so unfortunately I can't say for sure. Could someone run the tests again?

I don't think this patch causes any problems and it is a fix for the problem, although not very pretty. The real issue seems to be much deeper and harder to solve as I outlined in comment #2 above.

gagarine’s picture

Status: Needs work » Needs review
ttiurani’s picture

Unfortunately the v2, v3 and v4 do cause problems: when you apply the patch and press "Clear all caches", and then navigate to any other page except the front page, "active-trail" doesn't show up. And if you do go to the front page after clearing caches and get "active-trail" to show up, it stays on when you navigate to the user page, which I don't think it should. I also have managed to get "active-trail" to disappear a few times when I went back and forth to the user page and menu.

So it seems that _menu_tree_data() is too complex a method for a quick fix.

The first version of the patch, where the special casing is done in menu_tree_output() is the most stable, but doesn't fix the problem in modules such as menu_block which override that method.

So I guess the only thing to do is to fix this properly. I need to get this to work immediately so I will just do a quick fix in Menu Block.

aliyayasir’s picture

Still have this issue in drupal 7.16

drewschmaltz’s picture

Version: 7.14 » 7.17

I'm also not getting children of in the secondary menu - maybe this is related. Sort of shocked here. Fighting this and the fact that "active" never shows up for "my account".

matulis’s picture

Workaround for the <front> links
http://drupal.org/node/1571058#comment-6788662

jenlampton’s picture

Version: 7.17 » 7.19
Status: Needs review » Reviewed & tested by the community

Patch in #8 works great, thanks @ttiurani!

David_Rothstein’s picture

Version: 7.19 » 8.x-dev
Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs backport to D7

As far I can tell, this would exist in Drupal 8 too? Also, #10 indicates there are problems with the patch...

David_Rothstein’s picture

See also possible related issue or duplicate: #1063278: Menu item linked to <front> doesn't know its active

vortex9’s picture

I applied the patch v4 to 7.19, but it does't work

ttiurani’s picture

As I pointed out in #10, only the first version of the patch works, but it is a hack. I ended up using Menu Block to get around this problem.

vortex9’s picture

I'm using Nice menu. I can't combine Nice menu with Menu Block :(

Add this http://drupal.org/node/1571058#comment-6788662
Its works!

jenlampton’s picture

Alright, this takes the approach from the comment mentioned above and adds the active class attribute in the theme function - getting around the caching issues caused by the previous approach.

Attached patches for D8, and D7.

zhangx1a0’s picture

patch #20 works great!

Screenack’s picture

Patch core at your own risk. Until core is updated appropriately, I like this solution better: http://drupal.org/node/1571058#comment-6788662

vortex9’s picture

Version: 8.x-dev » 7.x-dev

update to 7.22 and apply #20 - cool!

David_Rothstein’s picture

Version: 7.x-dev » 8.x-dev
peyman_6000’s picture

Issue tags: -Needs backport to D7

fix_missing_active_trail.patch queued for re-testing.

vortex9’s picture

gapple’s picture

Title: Class active-trail not added to <li> when linking to <front> » Class active-trail not added to li element when linking to front page

As per #2126319: <strong>Strip HTML tags for issue titles in listings</strong>, HTML tags in issue titles are not entirely escaped on the listing page, which is breaking validity.

(and has been preventing http://drupalreleasedate.com from being able to parse the page in order to get a count of issues for some time now)

jenlampton’s picture

Patch in #20 still applies cleanly to 7.32

jenlampton’s picture

Issue tags: +Needs backport to D7

adding tag back.

Status: Needs review » Needs work

The last submitted patch, 20: core-fix_missing_active_trail-1578832-20.patch, failed testing.

jenlampton’s picture

Patch in #20 still applies cleanly to 7.39

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

This work-around almost works with Drupal 8.1.8...

  1. Disable the default/standard 'Home' menu link on the 'Main navigation' menu:
    /admin/structure/menu/link/standard.front_page/edit

  2. Add a new menu link to the 'Main navigation' menu:
    /admin/structure/menu/manage/main/add?destination=/admin/structure/menu/manage/main

    Menu link title: Home
    Link: /node

But /node is shown when you hover over the Home link, and /node will be exposed to search engines... neither of these are desirable.

I believe this is another symptom of the <front> or /node or / mess.

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.

alison’s picture

Harrumph, any chance of a fix getting into 8.x soon, or a functional patch for D8? :( :(

(Yes I know I'm not helping....... I'll look now and see if I feel capable enough to do something to help instead of just whining........)

alison’s picture

Errrrr never mind! Apparently it "just works," we just had a config wrong (someone added the menu link via menu admin UI, and linked to the front page or node/1 -- as soon as I removed that link and instead edited node #1 and added the menu link from in there, it worked fine/no troubles).

Sorry and never mind and thanks!

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.

alsator’s picture

Using superfish module has resolved it for me

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

Version: 8.5.x-dev » 8.6.x-dev
Status: Needs work » Needs review
Issue tags: +Needs tests coverage
FileSize
1.86 KB

I tried fixing this in the part that builds the menu tree, but time constraints on my project force me to take the template_preprocess_menu() route.

legolasbo’s picture

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

Shouldn't have changed the version. Sorry

Status: Needs review » Needs work

The last submitted patch, 43: 1578832-43.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 46: 1578832-46.patch, failed testing. View results

jenlampton’s picture

Patch in #34 still applies cleanly to Drupal 7.59.

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

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

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

lamp5’s picture

I can confirm that code from #46 works well. I use it as my theme preprocess until it will be tested and committed to core.

Martijn de Wit’s picture

Tried patch #48 as described in #50

When I visit the frontpage. Not only the frontpage link < li > is in the active-trail. But also all siblings.

<ul class="nav navbar-nav">
  <li class="nav-item active">
    <a href="/" class="nav-link active is-active" data-drupal-link-system-path="<front>">Home</a>
  </li>
  <li class="nav-item active">
    <a href="/2" class="nav-link active" data-drupal-link-system-path="node/4">link2</a>
  </li>
  <li class="nav-item active">
    <a href="/3" class="nav-link active" data-drupal-link-system-path="node/5">link3</a>
  </li>
  <li class="nav-item active">
    <a href="/4" class="nav-link active" data-drupal-link-system-path="node/6">link 4</a>
  </li>
</ul>
pdenooijer’s picture

Improved patch 46:

  • Use PathMatcher->isFrontPage() to check if preprocess is needed.
  • Add extra instanceof Url checks to make sure no WSOD occur.
  • Check if the menu item Url object isRouted instead of isExternal, as only isExternal could still throw an exception if an invalid internal route is in the menu items.
pdenooijer’s picture

Status: Needs work » Needs review
lukassykora’s picture

This version is working for me.

Status: Needs review » Needs work

The last submitted patch, 54: menu-class-active-trail-1578832-54.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

pdenooijer’s picture

Status: Needs work » Needs review

Sorry lukassykora but your patch is just a less defensive version of my patch and it failed the tests, so changing it back to review on my patch.

mishac’s picture

The patch in 52 seems to make *all* links on the front page have the "active-trail" class instead of just links to the front page :(

adamtong’s picture

i found a work-around for this issue, just create a disabled menu item for the true home page (e.g. /node/1) under home link.

lpeabody’s picture

Version: 8.6.x-dev » 8.9.x-dev
Status: Needs review » Reviewed & tested by the community

The patch in #52 applied cleanly on 8.7.8 and it worked for me. I cannot confirm the side effect mentioned in #57 - every menu link looks like it has the appropriate classes and only links representing the current page show as is-active.

Martijn de Wit’s picture

Added an automated test for 8.8 and 8.9 to the patch #52.

Hopefully this can be committed soon.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -Needs tests coverage +Needs tests

I think #60 is missing a patch. This issue needs an automated test in order to be committed.

joseph.olstad’s picture

@Martijn de Wit, can you please dig up the automated test that you wrote and somehow failed to upload to this issue?

joseph.olstad’s picture

Version: 8.9.x-dev » 9.0.x-dev

patch #52 still works great! Just tested it manually.

@Martijn de Wit, could you please find that automated test you wrote 5 months ago and somehow failed to upload?

joseph.olstad’s picture

Active class missing (illustration)

active class missing

Active After Applying Active Class

Active Property after applying active

joseph.olstad’s picture

Issue summary: View changes
Martijn de Wit’s picture

no, sry

joseph.olstad’s picture

after a few weeks of testing, patch 64 has regressions, it caused more than one link to have the active trail classes on the same page

I backed off the patch and removed it from our build.

As a workaround , our links for both of our languages are on one menu, internal links are fine, for external links we're using a workaround with css using a contrib module which allows specifying a class to the link. There's other ways to work around the external links I've used this method and another is to use also html lang attribute then the a element css selector on the href attribute based on a pattern to hide or show the opposite language external link.

Using one menu for both languages our active trail works fine. I'm not sure about the site default page issue haven't noticed it yet.

Anyhow, the patch 64 was derived from the others and I backed it off, no longer using it, doing a workaround instead.

previously we had menus for the default language and another different menu with another language and used block visibility on language for this, but this method proved to break the active trail for the 'other' language. So workaround is to use one menu for both our languages as I mentioned in this comment.

hope this helps.

xjm’s picture

Version: 9.0.x-dev » 8.8.x-dev

We should fix this bug in D8 too, so filing against 8.8.x (which is the current bugfix support branch). The issue will be automatically updated to 8.9.x after the last 8.8.x bugfix release. Thanks for juggling all the different patches for this fix!

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

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

nicholasThompson’s picture

Just applied patch 64 before reading comment 69... Can confirm 64 adds the in_active_trail too generously 😉

nicholasThompson’s picture

Ahh so the problem for me is that the frontpage is a node (node/1). So:

$validHomepageRoutes = ['', $homepageUrl->getRouteName()];

This contains and "entity.node.canonical" so every menu item that is front or a node gets flagged.

joseph.olstad’s picture

This being not fixed leaves us wanting to fix this.

challenges:

  • keep active trail functionality working for all links even if they are in another language
  • ensure wcag keyboard navigation is not broken by our workaround, which we wouldn't have to do if this issue was fixed.
  • wcag keyboard navigation fix is required because hidden links in a menu are not tabbable and since we display:none the other language link using an eng-only and fra-only / esp-only / jap-only class that goes something like html['lang='fr'] .eng-only { display:none; }
  • this breaks wcag , so go further into javascript now, and remove the .eng-only elements something like $(html['lang='fr']).find('.eng-only').remove(); using jQuery (actual code we're using is not exactly this but just for an idea).
  • By removing the display:none element from the html dom, the keyboard tab works and keyboard menu navigation works hence we can conserve our wcag compliance and accessibility

rather than do these workarounds, we would like to add a menu block per language allowing us to have unique weights for menu links and not have to fuss about external link translation for the url which is not always the same , often each language has an external link equivalient but for whatever reason (maybe explained above) this breaks the active-trail likely due to the bug mentionned above.

Currently we're working around this issue by using the https://www.drupal.org/project/menu_link_attributes menu_link_attributes module to provide a class attribute for links. We put this together on the same menu for both languages instead of a menu for each language (weights is another issue)

We want to make sure to maintain active trail functionality in both languages, there's the active class that indicates that the current link is what we're presently on, this is part of the menu functionality we didn't want to break and also keyboard navigation, due to wanting active trail to work in both languages we used one menu for two languages instead of two menus due to us wanting to work with what works for active trail menu links, one menu, links of all languages, internal links are no problem as they have a label that is translated and the internal link is automatically generated however external links like this one required a change in implementation to both the javascript and css, so we put a eng-only class on the english link that puts display: none on for the english link in french and a fra-only class on the french external link and there's another class attribute also, Drupal will render both links , css hides the other language external link, HOWEVER this does not fully allow wcag compliance in my recent wcag audits, SO we wrote some javascript to remove the other language link after the page is ready before the user navigates with the keyboard so when the menu link is configured as such using the specified class the javascript will also kick in and actually remove the other language link from the front end display which allows keyboard navigation to function correctly (wcag compliance, keyboard navigation is required). So the page renders, the css hides the other language link so it is never visible, then the javascript kicks in and removes the other language link from the html and thus we are able to pass wcag keyboard navigation and use the keyboard and tab key as expected.

it could be easier!

lpeabody’s picture

Assigned: Unassigned » lpeabody
Status: Needs work » Active

I'm going to try and address this in MenuTreeStorage::loadByRoute. Reasoning for this:

Assume you have the front page set as /node/1234. Also assume you have a menu named main and that menu has a single link which uses <front>.

Given the above, currently if you were to attempt to invoke MenuTreeStorage::loadByRoute('entity.node.canonical', ['node' => 1234], 'main'), you would get no results, even though that node is the front page.

I think the best course of action here is for the service to be aware of whether or not the passed route name/parameters represents the front page, and if it does then make the 'route_name' portion of the query part of an OR condition, where that condition also checks for <front>.

EDIT: I realize I didn't explain why this actually solves this issue. Which menu items get flagged as active comes from Drupal's menu.active_trail service. That service uses the current page's route match to get the page's route name and parameters, and invokes the aforementioned function to get the active link, and then it gets that links parents to build the rest of the trail.

The current page's route match will never, ever be the <front> route, it will always be what the actual route object is for that page in the system. So, we have to help MenuTreeStorage understand what the front page is.

lpeabody’s picture

Assigned: lpeabody » Unassigned
Status: Active » Needs work

Opened a MR with a somewhat rough implementation of where I think this needs to go. My local testing has been positive so far, and it appears to fix this issue in its entirety. I am not sure what kind of performance hit this adds. Still needs automated tests.

lpeabody’s picture

Yeah don't use the above branch for anything yet, lots of failed tests relating to cyclic dependencies, I'm hoping to be able to dig into it later today.

pfrenssen’s picture

This is the circular reference error thrown that is mentioned by @Ipeabody:

Circular reference detected for service "plugin.manager.menu.link", path: "plugin.manager.menu.link -> router.no_access_checks -> route_enhancer.param_conversion -> paramconverter_manager -> drupal.proxy_original_service.paramconverter.menu_link".

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
Neograph734’s picture

I've previously also noticed some weird behavior in the active trail when the homepage contained a query string (example.org?foo=bar). Weirdest that I fgured out is that there is also JavaScript involved. If you disable Javascript the front page never gets an active trail class.

Linking as relevant issues.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.