If I use Drush to clear the cache or import config, I get the following error:

exception 'UnexpectedValueException' with message 'External URLs do  [error]
not have an internal route
name.::base:admin/config/regional/date-time::/admin/config/regional/date-time'
in /code/core/lib/Drupal/Core/Url.php:554
Stack trace:
#0
/code/modules/contrib/config_perms/src/Routing/RouteSubscriber.php(32):
Drupal\Core\Url->getRouteName()
#1 /code/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php(38):
Drupal\config_perms\Routing\RouteSubscriber->alterRoutes(Object(Symfony\Component\Routing\RouteCollection))
#2
/code/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111):
Drupal\Core\Routing\RouteSubscriberBase->onAlterRoutes(Object(Drupal\Core\Routing\RouteBuildEvent),
'routing.route_a...',
Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#3 /code/core/lib/Drupal/Core/Routing/RouteBuilder.php(184):
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('routing.route_a...',
Object(Drupal\Core\Routing\RouteBuildEvent))
#4
/code/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83):
Drupal\Core\Routing\RouteBuilder->rebuild()
#5 /code/core/includes/common.inc(1141):
Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
#6 /code/core/includes/utility.inc(51): drupal_flush_all_caches()
#7 phar:///usr/local/bin/drush/commands/core/cache.drush.inc(291):
drupal_rebuild(Object(Composer\Autoload\ClassLoader),
Object(Symfony\Component\HttpFoundation\Request))
#8 [internal function]: drush_cache_rebuild()
#9 phar:///usr/local/bin/drush/includes/command.inc(366):
call_user_func_array('drush_cache_reb...', Array)
#10 phar:///usr/local/bin/drush/includes/command.inc(217):
_drush_invoke_hooks(Array, Array)
#11 [internal function]: drush_command()
#12 phar:///usr/local/bin/drush/includes/command.inc(185):
call_user_func_array('drush_command', Array)
#13 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67):
drush_dispatch(Array)
#14 phar:///usr/local/bin/drush/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#15 phar:///usr/local/bin/drush/includes/startup.inc(321):
drush_main()
#16 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#17 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#18 {main}

This does not happen when clearing the cache in the UI, or with doing the equivalent commands using Drupal Console.

It looks like we have a URL that is not fully formed:

Drupal\Core\Url::__set_state(array(
   'urlGenerator' => NULL,
   'urlAssembler' => NULL,
   'accessManager' => NULL,
   'routeName' => NULL,
   'routeParameters' =>
  array (
  ),
   'options' =>
  array (
  ),
   'external' => false,
   'unrouted' => true,
   'uri' => 'base:admin/config/regional/date-time',
   'internalPath' => NULL,
   '_serviceIds' =>
  array (
  ),
))

I tried switching to an alternative method of getting the internal route:
https://www.drupal.org/node/2385923#comment-11737567
and I just got a different kind of exception

$ drush cr
exception                                                            [error]
'Symfony\Component\Routing\Exception\MethodNotAllowedException' in
/code/core/lib/Drupal/Core/Routing/MethodFilter.php:47
Stack trace:
#0 /code/core/lib/Drupal/Core/Routing/LazyRouteFilter.php(95):
Drupal\Core\Routing\MethodFilter->filter(Object(Symfony\Component\Routing\RouteCollection),
Object(Symfony\Component\HttpFoundation\Request))
#1
/code/vendor/symfony-cmf/routing/NestedMatcher/NestedMatcher.php(149):
Drupal\Core\Routing\LazyRouteFilter->filter(Object(Symfony\Component\Routing\RouteCollection),
Object(Symfony\Component\HttpFoundation\Request))
#2 /code/vendor/symfony-cmf/routing/DynamicRouter.php(272):
Symfony\Cmf\Component\Routing\NestedMatcher\NestedMatcher->matchRequest(Object(Symfony\Component\HttpFoundation\Request))
#3 /code/vendor/symfony-cmf/routing/ChainRouter.php(186):
Symfony\Cmf\Component\Routing\DynamicRouter->matchRequest(Object(Symfony\Component\HttpFoundation\Request))
#4 /code/vendor/symfony-cmf/routing/ChainRouter.php(146):
Symfony\Cmf\Component\Routing\ChainRouter->doMatch('/admin/config/p...')
#5
/code/modules/contrib/config_perms/src/Routing/RouteSubscriber.php(30):
Symfony\Cmf\Component\Routing\ChainRouter->match('/admin/config/p...')
#6 /code/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php(38):
Drupal\config_perms\Routing\RouteSubscriber->alterRoutes(Object(Symfony\Component\Routing\RouteCollection))
#7
/code/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111):
Drupal\Core\Routing\RouteSubscriberBase->onAlterRoutes(Object(Drupal\Core\Routing\RouteBuildEvent),
'routing.route_a...',
Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#8 /code/core/lib/Drupal/Core/Routing/RouteBuilder.php(184):
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('routing.route_a...',
Object(Drupal\Core\Routing\RouteBuildEvent))
#9
/code/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83):
Drupal\Core\Routing\RouteBuilder->rebuild()
#10 /code/core/includes/common.inc(1141):
Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
#11 /code/core/includes/utility.inc(51): drupal_flush_all_caches()
#12 phar:///usr/local/bin/drush/commands/core/cache.drush.inc(291):
drupal_rebuild(Object(Composer\Autoload\ClassLoader),
Object(Symfony\Component\HttpFoundation\Request))
#13 [internal function]: drush_cache_rebuild()
#14 phar:///usr/local/bin/drush/includes/command.inc(366):
call_user_func_array('drush_cache_reb...', Array)
#15 phar:///usr/local/bin/drush/includes/command.inc(217):
_drush_invoke_hooks(Array, Array)
#16 [internal function]: drush_command()
#17 phar:///usr/local/bin/drush/includes/command.inc(185):
call_user_func_array('drush_command', Array)
#18 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67):
drush_dispatch(Array)
#19 phar:///usr/local/bin/drush/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#20 phar:///usr/local/bin/drush/includes/startup.inc(321):
drush_main()
#21 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#22 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#23 {main}

Comments

dalin created an issue. See original summary.

benellefimostfa’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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