Problem/Motivation
In Umami, when visiting a 404 page, umami_preprocess_breadcrumb throws the following exception:
TypeError: Drupal\Core\Controller\TitleResolver::getTitle(): Argument #2 ($route) must be of type Symfony\Component\Routing\Route, null given, called in /var/www/html/core/profiles/demo_umami/themes/umami/umami.theme on line 113 in Drupal\Core\Controller\TitleResolver->getTitle() (line 51 of core/lib/Drupal/Core/Controller/TitleResolver.php).
It happens because $route_match->getRouteObject() returns NULL for these pages.
Code in umami_preprocess_breadcrumb() should check the existence of the route before trying to retrieve the page title.
Steps to reproduce
- Install a fresh installations of Umami using 11.x
- Login into the site
- Access to a page like /foo
- See the exception mentioned above in the page footer
Proposed resolution
Ensure that route object is available in umami_preprocess_breadcrumb and do not check for the title if it's not available.

Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | Screenshot 2026-03-26 at 16-39-18 Page not found Umami Food Magazine.png | 200.79 KB | fizcs3 |
Issue fork drupal-3560127
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
aryan singh commentedWorking...
Comment #4
aryan singh commentedComment #5
plopescThis MR should be in the scope of Umami. Please see recommendation in the IS to modify the logic in
umami_preprocess_breadcrumb()Comment #6
aryan singh commentedThanks @plopesc for your input.I have updated the code in "umami_preprocess_breadcrumb()".Please review and let me know if any further changes are needed.
Comment #7
smustgrave commentedMay be overkill but wonder if we can get a small test case or better extend an existing one.
Comment #9
mdranove commentedAdded test
Comment #10
smustgrave commentedLeft comments on the MR.
Comment #11
mdranove commentedAddressed comment
Comment #13
smustgrave commentedFeedback for this one appears to be addressed.
Comment #14
longwaveAdded a question to the MR.
Comment #15
mradcliffeI performed Novice Triage on this issue. I am leaving the Novice tag on this issue because this would be a good opportunity to learn how to rebase based on core. The changes need to be moved to the Hooks implementation.
I could not find @longwave’s comment in the merge request so that may have gotten lost in the merge conflict.
The Drupal Contribution Mentoring team is triaging issues for DrupalCon Chicago 2026, and we are reserving this issue for Mentored Contribution during the event.
After Thursday 26th March 2026 + 1 DAY (13:00 UTC), this issue returns to being open to all. Thanks!
Comment #16
alexbaron77I am currently solving the PR conflict at the contribution workshop of drupalcon chicago.
Comment #17
rklawson commentedI am helping (@rklawson) on the issue at DrupalCon Chicago 2026.
Comment #20
dany.almeida.kairouzComment #21
dcam commentedAssigning to myself for the review.
Comment #22
dcam commentedThank you very much to all of the new contributors in Chicago (or elsewhere) who worked on this issue!
I've reviewed the MR and left several comments on it for items that need to be changed. Please consider them. Some of them have suggestions included. If you think the suggestion is appropriate, then you can apply suggestions individually or as a batch on the merge request's page using the "Apply suggestion" dropdown above the suggestion.
If anyone needs clarification about something or has questions, then you can feel free to DM or tag me in the core-development channel of the Drupal Slack today where my username is @dcam.
Comment #23
alexbaron77thanks dcam for the review and the help.
Comment #24
dany.almeida.kairouzComment #25
fizcs3 commentedTested MR!13971 on Drupal 11.x-dev and confirming that the error no longer appears on the 404 page.
Code has already been reviewed by @dcam
Comment #26
fizcs3 commentedComment #27
mradcliffeThank you @fizccs3 for a review and test of the merge request, @dany.almeida.kairouz for mentoring, @alexbaron77 and @rklawson for making code changes and fixes for working on the issue, and thank you @dcam for working with them to provide review and resolving the comments.
Comment #28
fizcs3 commentedworking with @mradcliffe, who suggested I take a screenshot as well
Comment #29
alexbaron77#reviewed
the initial fix has been fixed.
pipeline ok
unit tests ok
approved
Comment #30
godotislateThe test only job passes, when it should fail: https://git.drupalcode.org/issue/drupal-3560127/-/jobs/9113957
Can we make sure that there's a test demonstrates the problem without the fix?
Comment #31
dcam commentedThere was a brief discussion in the core-maintainers Slack channel about this on March 26. @berdir noted that this issue was possibly fixed by #3349201: Big Pipe, logged-in users and 4xx pages and no longer exists. And no one actually confirmed that the issue still exists during their review, not even me. I was fighting with my local environment that day, which is why I never did a complete review after that initial code review in #22.
Comment #32
godotislateOK, could someone confirm that it's still an issue, and close if not? In the meantime I've updated credit.
Comment #33
mdranove commentedI went ahead and added the single change from #3349201, the update to BigPipeStrategy.php to my fresh umami install using 11.3.6.
I could no longer repro the issue.
Im thinking we can close this.
Comment #34
dcam commentedClosing per #33.