Problem/Motivation

TypeError: Drupal\Core\Controller\TitleResolver::getTitle(): Argument #2 ($route) must be of type Symfony\Component\Routing\Route, null given, called in /web/themes/contrib/zurb_foundation/zurb_foundation.theme on line 29 in Drupal\Core\Controller\TitleResolver->getTitle() (Zeile 50 in /web/core/lib/Drupal/Core/Controller/TitleResolver.php)

Guess we should add a null check here?
See similar issues and fixes:
#3328303: [error] TypeError: Argument 2 passed to Drupal\Core\Controller\TitleResolver::getTitle() must be an instance of Symfony\Component\Routing\Route, null given, called in /app/web/modules/contrib/openfed_social/src/Plugin/Block/OpenfedSocialBlock.php
#3523862: Argument #2 ($route) must be of type Symfony\Component\Routing\Route, null given
#3155640: [error] TypeError: Argument 2 passed to Drupal\Core\Controller\TitleResolver::getTitle() must be an instance of Symfony\Component\Routing\Route, null given, called in /app/web/modules/contrib/addtoany/addtoany.module on line 252

Helpful backtrace:

TypeError: Drupal\Core\Controller\TitleResolver::getTitle(): Argument #2 ($route) must be of type Symfony\Component\Routing\Route, null given, called in /web/themes/contrib/zurb_foundation/zurb_foundation.theme on line 29 in Drupal\Core\Controller\TitleResolver->getTitle() (Zeile 50 in /web/core/lib/Drupal/Core/Controller/TitleResolver.php)

#0 /web/themes/contrib/zurb_foundation/zurb_foundation.theme(29): Drupal\Core\Controller\TitleResolver->getTitle()
#1 [internal function]: zurb_foundation_preprocess_breadcrumb()
#2 /web/core/lib/Drupal/Core/Theme/ThemeManager.php(308): call_user_func_array()
#3 /web/core/lib/Drupal/Core/Render/Renderer.php(497): Drupal\Core\Theme\ThemeManager->render()
#4 /web/core/lib/Drupal/Core/Render/Renderer.php(227): Drupal\Core\Render\Renderer->doRender()
#5 /web/core/lib/Drupal/Core/Template/TwigExtension.php(491): Drupal\Core\Render\Renderer->render()
#6 /web/sites/default/files/php/twig/68ecbf87e004d_block.html.twig_3Uca7zfxRyZda-Hp-6AUaUVgG/eE_bMJS8wsI21qtT8TuWYu1Gc9XHrE6TRD1PTKjCO9Y.php(236): Drupal\Core\Template\TwigExtension->escapeFilter()
#7 /vendor/twig/twig/src/Template.php(446): __TwigTemplate_af99aac2855d7f40c6684ce3d37dc0d2->block_content_inner()
#8 /web/sites/default/files/php/twig/68ecbf87e004d_block.html.twig_3Uca7zfxRyZda-Hp-6AUaUVgG/eE_bMJS8wsI21qtT8TuWYu1Gc9XHrE6TRD1PTKjCO9Y.php(212): Twig\Template->yieldBlock()
#9 /vendor/twig/twig/src/Template.php(446): __TwigTemplate_af99aac2855d7f40c6684ce3d37dc0d2->block_content()
#10 /web/sites/default/files/php/twig/68ecbf87e004d_block.html.twig_3Uca7zfxRyZda-Hp-6AUaUVgG/eE_bMJS8wsI21qtT8TuWYu1Gc9XHrE6TRD1PTKjCO9Y.php(121): Twig\Template->yieldBlock()
#11 /vendor/twig/twig/src/Template.php(446): __TwigTemplate_af99aac2855d7f40c6684ce3d37dc0d2->block_block_wrapper()
#12 /vendor/twig/twig/src/Template.php(491): Twig\Template->yieldBlock()
#13 /web/sites/default/files/php/twig/68ecbf87e004d_block--system-breadcrumb-_dQmnXuLtd9DcXqMmaATvy9Zc3/g3VcvdXLYu5hZz1XJOBN9KgfjyYx2V-ljKbHGs-Hp_o.php(72): Twig\Template->yieldParentBlock()
#14 /vendor/twig/twig/src/Template.php(446): __TwigTemplate_392939e7e131e1bc72b1ec2a8fbb732c->block_block_wrapper()
#15 /web/sites/default/files/php/twig/68ecbf87e004d_block.html.twig_3Uca7zfxRyZda-Hp-6AUaUVgG/eE_bMJS8wsI21qtT8TuWYu1Gc9XHrE6TRD1PTKjCO9Y.php(77): Twig\Template->yieldBlock()
#16 /vendor/twig/twig/src/Template.php(446): __TwigTemplate_af99aac2855d7f40c6684ce3d37dc0d2->block_block_outer()
#17 /web/sites/default/files/php/twig/68ecbf87e004d_block.html.twig_3Uca7zfxRyZda-Hp-6AUaUVgG/eE_bMJS8wsI21qtT8TuWYu1Gc9XHrE6TRD1PTKjCO9Y.php(56): Twig\Template->yieldBlock()
#18 /vendor/twig/twig/src/Template.php(402): __TwigTemplate_af99aac2855d7f40c6684ce3d37dc0d2->doDisplay()
#19 /web/sites/default/files/php/twig/68ecbf87e004d_block--system-breadcrumb-_dQmnXuLtd9DcXqMmaATvy9Zc3/g3VcvdXLYu5hZz1XJOBN9KgfjyYx2V-ljKbHGs-Hp_o.php(49): Twig\Template->yield()
#20 /vendor/twig/twig/src/Template.php(402): __TwigTemplate_392939e7e131e1bc72b1ec2a8fbb732c->doDisplay()
#21 /vendor/twig/twig/src/Template.php(358): Twig\Template->yield()
#22 /vendor/twig/twig/src/Template.php(373): Twig\Template->display()
#23 /vendor/twig/twig/src/TemplateWrapper.php(51): Twig\Template->render()
#24 /web/core/themes/engines/twig/twig.engine(34): Twig\TemplateWrapper->render()
#25 /web/core/lib/Drupal/Core/Theme/ThemeManager.php(380): twig_render_template()
#26 /web/core/lib/Drupal/Core/Render/Renderer.php(497): Drupal\Core\Theme\ThemeManager->render()
#27 /web/core/lib/Drupal/Core/Render/Renderer.php(250): Drupal\Core\Render\Renderer->doRender()
#28 /web/core/lib/Drupal/Core/Render/Renderer.php(141): Drupal\Core\Render\Renderer->doRenderRoot()
#29 /web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}()
#30 /web/core/lib/Drupal/Core/Render/Renderer.php(140): Drupal\Core\Render\Renderer->executeInRenderContext()
#31 /web/core/lib/Drupal/Core/Render/Renderer.php(167): Drupal\Core\Render\Renderer->renderInIsolation()
#32 /web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRenderPlaceholder()
#33 /web/core/modules/big_pipe/src/Render/BigPipe.php(730): Drupal\Core\Render\Renderer->renderPlaceholder()
#34 /web/core/modules/big_pipe/src/Render/BigPipe.php(500): Drupal\big_pipe\Render\BigPipe->renderPlaceholder()
#35 [internal function]: Drupal\big_pipe\Render\BigPipe->Drupal\big_pipe\Render\{closure}()
#36 /web/core/modules/big_pipe/src/Render/BigPipe.php(507): Fiber->start()
#37 /web/core/modules/big_pipe/src/Render/BigPipe.php(256): Drupal\big_pipe\Render\BigPipe->sendPlaceholders()
#38 /web/core/modules/big_pipe/src/Render/BigPipeResponse.php(116): Drupal\big_pipe\Render\BigPipe->sendContent()
#39 /vendor/symfony/http-foundation/Response.php(397): Drupal\big_pipe\Render\BigPipeResponse->sendContent()
#40 /web/index.php(20): Symfony\Component\HttpFoundation\Response->send()
#41 {main}

Steps to reproduce

Open a non-existent (404) page (probably in combination with other modules)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#9 zurb_foundation-3551798-MR34-09.patch934 bytesanybody
Command icon 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

anybody created an issue. See original summary.

anybody’s picture

Issue summary: View changes
anybody’s picture

Issue summary: View changes
anybody’s picture

Status: Active » Needs review

Please review. Should be correct according to the linked issues.
Otherwise we simply don't touch the title.

grevil’s picture

Added one comment. Otherwise LGTM!

grevil’s picture

Status: Needs review » Reviewed & tested by the community

Perfect.

thomas.frobieter’s picture

Confirming RTBC. Can we merge this and maybe tag a new release maybe? The last is from Feb 2025 :/

anybody’s picture

StatusFileSize
new934 bytes

Static patch attached until this is merged.

anybody’s picture

sim_1’s picture

Status: Reviewed & tested by the community » Fixed

Merged and marking as fixed. Thank you!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

anybody’s picture

Thank you very much @sim_1!!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.