Trailing Slash Breaks When Multiple Entity Types are Found via $url->getRouteParameters()

Created on 1 August 2023, over 1 year ago
Updated 11 March 2024, 10 months ago

Problem/Motivation

Certain modules, such as facets_pretty_paths, add additional route parameters that subsequently need to be looped through in order to find a match for the node bundles to work.

Steps to reproduce

Install trailing_slash module, install facets_pretty_paths and configure a search widget and some facets then add to a basic page (via block regions). Configure the basic page as enabled in trailing_slash settings. Navigate to the page and observe no trailing slash is added.

Proposed resolution

Instead of `$entity_type = key($params);` which only grabs the current (first) item in the array, we should `$entity_types = array_keys($params);` then loop through them in order to find the entity_type

Remaining tasks

n/a

User interface changes

none

API changes

none

Data model changes

none

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States luke adams

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024