- Issue created by @NicolasGraph
- Issue was unassigned.
- Status changed to Needs review
9 months ago 9:00am 6 October 2023 - Status changed to RTBC
8 months ago 12:07pm 17 October 2023 - First commit to issue fork.
- last update
7 months ago Build Successful - First commit to issue fork.
- Merge request !15Issue #3392139 by NicolasGraph, joey91133: Wrong breadcrumb due to route alterations β (Open) created by xurizaemon
- π¬π§United Kingdom nicrodgers Monmouthshire, UK
xurizaemon β credited nicrodgers β .
- π³πΏNew Zealand xurizaemon Εtepoti, Aotearoa π
I pulled @nicrodgers sort before comparison of the route and raw parameters over from π Current page added twice due to route alterations Closed: duplicate .
- π³π±Netherlands mike.vindicate
xurizaemon β credited mike.vindicate β .
- π³πΏNew Zealand xurizaemon Εtepoti, Aotearoa π
Over in [#] there's a suggestion from @webflo @joaopauloscho to use
!array_diff_assoc($routeParams, $rawParams)
instead of$routeParams == $rawParams
.$routeParams == $rawParams
ensures the keys and values match and doesn't care about order.!array_diff_assoc($routeParams, $rawParams)
ensures that all entries in $routeParams are matched in $rawParams (and allows for additional $rawParams entries).php > $routeParams = ['b' => 'b', 'a' => 'a']; php > $rawParams = ['a' => 'a', 'b' => 'b']; php > var_dump($routeParams == $rawParams); bool(true) php > var_dump(!array_diff_assoc($routeParams, $rawParams)); bool(true) php > $rawParams['c'] = 'c'; # All values in routeParams exist in rawParams. php > var_dump(!array_diff_assoc($routeParams, $rawParams)); bool(true) # Some values in rawParams exist in routeParams. php > var_dump(!array_diff_assoc($rawParams, $routeParams)); bool(false)
Which comparison is more correct here?
- Merge request !17Draft: Issue #3392139, #3215110 - test only - breadcrumbs on taxonomy/term/%tid β (Closed) created by xurizaemon
- π³πΏNew Zealand xurizaemon Εtepoti, Aotearoa π
Seems this can be repro'd as easily as
taxonomy/term/1
- debug here from\Drupal\menu_breadcrumb\MenuBasedBreadcrumbBuilder::addMissingCurrentPage()
shows that route and raw parameters may be sorted differently. Added test\Drupal\Tests\menu_breadcrumb\Functional\MenuBreadcrumbTest
to cover this. - π³πΏNew Zealand xurizaemon Εtepoti, Aotearoa π
@zenimagine, here are docs for patching modules when using composer β
- Status changed to Needs review
3 months ago 6:24am 8 April 2024 - π³πΏNew Zealand xurizaemon Εtepoti, Aotearoa π
Moving this back from RTBC since there are changes to be reviewed!
@zenimagine, on this issue a Merge Request ("MR") has superseded the patch submitted in #2. So review should focus on the changes available from the MR. On the MR URL, you'll see tabs for eg "Commits" (the initial change from #2, and later changes) and "Changes" (the current proposed changes from this MR).
The required patch is linked on this issue (text "plain diff" near MR !15), which is the MR URL with
.diff
appended.That file can be saved and used as a patch in your local codebase, or (quicker but not recommended for production builds) referenced directly in your composer patches configuration.
- π΅π±Poland azovsky
azovsky β changed the visibility of the branch 3392139-wrong-breadcrumb-due to hidden.
- π΅π±Poland azovsky
azovsky β changed the visibility of the branch 3392139-wrong-breadcrumb-due to active.