addMissingCurrentPage adds current page some times incorrectly

Created on 14 September 2023, about 1 year ago
Updated 5 October 2023, about 1 year ago

Problem/Motivation

While using the module I noticed that on a certain page the breadcrumb was "Shop/Posters/Posters" but in other pages it was like it supposed to be for example "Shop/Fine Art". After some digging inside the code I noticed that on MenuBasedBreadcrumbBuilder::addMissingCurrentPage() (line 407) the $last_url->getRouteParameters() and $route_match->getRawParameters()->all() returned the same array but in different order. This was causing the equality check to return false and proceed to add the current url.

Steps to reproduce

Not sure why the 2 arrays had a different order.

Proposed resolution

Check the arrays equality in a way that does not care about the order.

🐛 Bug report
Status

Closed: duplicate

Version

1.16

Component

Code

Created by

🇬🇷Greece Christos Diamantis

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024