Problem/Motivation
The node edit route is created in \Drupal\node\Entity\NodeRouteProvider and has neither a '_title' nor a '_title_callback'.
That was fine until this commit: https://cgit.drupalcode.org/easy_breadcrumb/commit/?id=4d2df56
Before this commit
$title = $this->titleResolver->getTitle($route_request, $route_match->getRouteObject());
resulted in $title being NULL, and therefore !isset($title) being TRUE, and therefore a fallback title was created via
$title = str_replace(array('-', '_'), ' ', Unicode::ucfirst(end($path_elements)));
But after this commit
$title = $this->getTitleString($route_request, $route_match, $replacedTitles);
results in $title being FALSE, and therefore !isset($title) being FALSE, and therefore a no fallback title is created anymore.
Proposed resolution
The function getTitleString should return NULL instead of FALSE.
Remaining tasks
Review.
User interface changes
Breadcrumb for node edit available again.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | interdiff-2971408-2-5.txt | 715 bytes | loopduplicate |
| #5 | 2971408_node_edit-5.patch | 1.3 KB | loopduplicate |
| #2 | 2971408_node_edit-2.patch | 1.16 KB | Maouna |
Comments
Comment #2
Maouna commentedComment #3
greg boggsWow. Nice catch! Thank you.
Comment #4
daggerhart commentedGreat catch and solution. Patch is simple, applies cleanly, and resolves the issue. Thanks!
Comment #5
loopduplicate commentedLooks great! I found one code comment that needed updating. Committing soon :)
Comment #7
loopduplicate commentedThanks :)