EntityResolverManager does not set route options for _title_callback

Created on 18 November 2014, about 10 years ago
Updated 10 February 2023, almost 2 years ago

Problem/Motivation

EntityResolverManager's job is to set the appropriate entity:<entity_type_id> types for the route parameters during route rebuilding so that they can later be upcast.

It does this by figuring out the controller method and then using reflection to see if any of the parameters is typehinted to an entity type specific interface. Thus, if you add a NodeInterface $node parameter to your controller method and have a {node} slug in your route, then you will get the actual node object, not just the ID.

This does not work for title callbacks. If - in addition to the title callback - the controller method does have a typehinted parameters, the route parameter information is updated and everything works (as this is per route). If only the title callback has a typehinted parameter, though, and not the controller method, then it doesn't work. That's what makes this a bug report vs. a feature request.

Proposed resolution

Remaining tasks

User interface changes

API changes

πŸ› Bug report
Status

Closed: works as designed

Version

9.5

Component
RoutingΒ  β†’

Last updated 3 days ago

Created by

πŸ‡©πŸ‡ͺGermany tstoeckler Essen, Germany

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

Comments & Activities

Not all content is available!

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

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    There has been no response to the question asked 6 years ago nor 4 months ago. There is no indication if this is still relevant. Therefore, I am closing this issue.

    If you are experiencing this problem reopen the issue and comment.

    Thanks.

Production build 0.71.5 2024