addMissingCurrentPage adds current page some times incorrectly

Created on 14 September 2023, 10 months ago
Updated 5 October 2023, 9 months 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.69.0 2024