Closed (fixed)
Project:
etracker
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Feb 2026 at 15:12 UTC
Updated:
7 Jul 2026 at 08:00 UTC
Jump to comment: Most recent
If some cases a WPOD appears if corresponding route is found for a node with menu entry.
UnexpectedValueException: base:de/sport has no corresponding route
#0 /var/www/www.krefeld.de/docroot/modules/contrib/etracker/etracker.module(334): Drupal\Core\Url->getRouteName()
#1 /var/www/www.krefeld.de/docroot/modules/contrib/etracker/etracker.module(374): _etracker_set_default_variables()
#2 /var/www/www.krefeld.de/docroot/modules/contrib/etracker/etracker.module(206): _etracker_add_variable()
#3 /var/www/www.krefeld.de/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php(552): etracker_page_attachments_alter()
I think there anywhere some defense needed to avoid the WPOD for the end user.
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 #4
nickolajAdded `Url::isRouted()` check before calling `getRouteName()` in `_etracker_set_default_variables()` to prevent the `UnexpectedValueException` when breadcrumb links reference unrouted URLs (e.g. manually created menu entries).
Comment #5
sunlixSo yeah, that is a rabbit hole. :D
I wanted to add a functional test to test the breadcrumb as area feature at all, because we don't cover it yet.
On the track I found out, that the feature never really worked.
Some tiny adjustment seems to work, but the test do not run through stage two after altering
etracker.settings.I think we have a caching error here. Relevant caches were not invalidated after saving settings.
Caling
drupal_flush_all_caches();inside the test let the test run through, but we have to figure out, were the config cache context is needed.Comment #6
sunlixSo, I think this is now ready for the moment.
On the bigger picture the hooks should be reworked because there is some kind of dead code like
preprocess_pageand the logic in_etracker_add_variableand_etracker_set_default_variablesis unnecessary and basically has no effect because the individualisations where done inpage_attachments_alteralready.The call path is
attachments_alter -> preprocess_pageWhat I am really worried about is, that currently no test from the main module is running in the gitlab pipeline. Only the submodule tests from
cookies_etrackerare running.Comment #7
sunlixThank you for your contribution!
For now we are good to go here. The real work awaits on #3605509: Rework default_variable handling in .module