Routes with a parameter converter but no entity do not get their title inserted in the breadcrumb

Created on 8 April 2021, over 3 years ago
Updated 20 August 2024, 4 months ago

Problem/Motivation

We have a custom module that uses a parameter converter to interpret a variable part of the URL. It triggers the code that was added for #3165579: Use the page entity title when available . However, this code does not take into account it might not result in a title (because it can not resolve to an entity that has a label) and will then drop through to the fallback of adding the raw path component.

Steps to reproduce

No specific steps to reproduce right now, although I expect it to involve adding a route (probably with a parameter convert, although I am not 100% positive that is a requirement) that does not resolve to an entity. Maybe I can whip something together as a test.

Proposed resolution

Instead of an if/else, handle the situation like the other situations, where it is checked whether a title was found already, and if not, trigger the "old" code that calls the title callback.

Remaining tasks

  • Finish test
  • Review
  • Merge

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇳🇱Netherlands eelkeblok Netherlands 🇳🇱

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024