Reported by @agentrickard on IRC - Not sure where to categorize this for now, so I put this in "base system".
When installing a fresh HEAD with "drush si", you get several (three)
"WD menu: RouteNotFoundException: Route "field_ui.overview.comment" does not exist." exceptions.
The install process keeps going (thanks to drush forked-process batch handling ?) and seems to finish correctly.
Stepping through a debugger:
The exceptions are raised within theme_enable() / theme_disable() (standard install enables bartik, disables stark, enables seven -> 3 calls, matching the three exceptions)
- theme_(en|dis)able() triggers menu_router_rebuild() / menu_router_build()
- menu_router_build() calls every hook_menu(), and on each entry with a 'route name', tries to find the corresponding route.
At this point, field_ui_menu() is seen, but its Drupal\field_ui\Routing\RouteSubscriber hasn't been triggered yet, and the routes referenced in field_ui_menu() do not exist -> Exception
- Drupal\field_ui\Routing\RouteSubscriber only runs later in the install process, during the drupal_flush_all_caches() call in _install_profile_modules_finished() (batch 'finished' callback for the install_profile_modules() install task)
Comment | File | Size | Author |
---|---|---|---|
#8 | core-routenotfound-exception-1986902-8.patch | 681 bytes | clemens.tolboom |
#5 | core-routenotfound-exception-1986902-5.patch | 490 bytes | clemens.tolboom |
Comments
Comment #1
yched CreditAttribution: yched commentedLooks like this does not affect installs through the UI, so re-assigning to drush
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedI've noticed this too. Thanks for the debug trace.
Drush just calls install_drupal(). This is core's bug, and specifically triggerred by core's non-interactive installer. Help wanted.
Comment #3
clemens.tolboomThis issue was reported in drush #1969850: RouteNotFoundException: Route "path_delete" does not exist but this issue describes the cause better.
Comment #4
clemens.tolboomI forgot to add that in #1969850: RouteNotFoundException: Route "path_delete" does not exist that this is also the case when installed manually the core/install.php
- http://drupal.d8/admin/reports/dblog
which contradicts #1. I'll double check by another walkthrough of the issue summary.
Comment #5
clemens.tolboomWe have only two modules providing a RouteSubscriber: field_ui and rest.
Changing standard profile by not including field_ui but rest in standard.info.yml gives the following on http://drupal.d8/admin/reports/dblog
The error comes from path/path.module: hook_menu().
So this has not much to do with RouteSubscriber as well with menu rebuilding.
Attached patch seems to fix the issue but this should have a test.
Comment #6
yched CreditAttribution: yched commentedAh, right, when I tested, UI install seemed to work fine, but I didn't check the status log after that.
Not too sure where this should be fixed, but I don't think standard_install() is the right place, since other install profiles will be affected as well.
Comment #7
clemens.tolboomI agree current patch is not how it should be solved. But I have no clue how it should be solved. Let alone how to write a test for it.
Should we add this to
?
Comment #8
clemens.tolboomThe weird part is we are enabling modules and then the 'module' standard.install 'decides' it'll configures the system. We have no clue the profile is about the get installed.
Attached patch prepend enabling the current profile with drupal_flush_all_caches(); in _install_module_batch
Comment #9
moshe weitzman CreditAttribution: moshe weitzman commentedThe installer is already extremely slow. We should not slow it down further with cache flushes unless we really understand why they are there, and document it.
Comment #10
clemens.tolboom@moshe weitzman agreed.
Install_core.inc has 2 calls to drupal_flush_all_caches
- function install_finished
- function _install_profile_modules_finished
Esp. the latter looks weird as it's a one liner. Which of the two is really needed?
While debugging I wondered why we didn't make the profile installed last or even after all modules are enabled? That requires another batch step.
IMHO a profile is not just another module.
Does this related to #1356276: Allow profiles to define a base/parent profile?
Comment #11
moshe weitzman CreditAttribution: moshe weitzman commentedYeah, I think the profile should go last, and futher it could add itself at the end as a task (or something) and not try to masquerade a module. Sounds like a relatively easy fix.
Comment #12
dcrocks CreditAttribution: dcrocks commentedIs this going anywhere. I can verify that #8 eliminates the messages but is not a desirable fix.
Comment #13
dcrocks CreditAttribution: dcrocks commentedI haven't seen these messages in recent installs of 8-x.dev)several weeks). Haven't tried drush though. Can this be closed?
Comment #14
clemens.tolboom@dcrocks thanks for check back.
I've checked both web/interactive install and drush site-install. There is no RouteNotFoundException exception anymore.
I haven't found the code change for this fix. Candidate files are install.core.inc, module.inc, ModuleHandler.php, theme.inc and menu.inc
#2004784: Move module install/uninstall implementations into ModuleInstaller
#1992606: Convert system_theme_settings to FormInterface
#1947720: Use Drupal::state() to replace state()
With drush I had this unrelated error
WD cron: Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: The service definition "keyvalue.expirable.null" does not exist. in Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition() (line 875 of /Users/clemens/Sites/drupal/d8/www/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php). [error]
Issue will be closed.
Comment #14.0
clemens.tolboomtypo