Commit 3a27d38f authored by catch's avatar catch

Issue #2181151 by dawehner, tim.plunkett, InternetDevels, botanic_spark:...

Issue #2181151 by dawehner, tim.plunkett, InternetDevels, botanic_spark: Remove router rebuild from menu_ui.install
parent 01b3613b
......@@ -56,6 +56,8 @@ public function testMenuLinkContentDeleteForm() {
$this->assertLinkByHref($menu_link->url('edit-form'));
\Drupal::service('module_installer')->install(['menu_ui']);
\Drupal::service('router.builder')->rebuild();
// Make sure cancel URL points to menu_ui route now.
$this->drupalGet($menu_link->urlInfo('delete-form'));
$menu = Menu::load($menu_link->getMenuName());
......
<?php
/**
* @file
* Install, update and uninstall functions for the menu_ui module.
*/
/**
* Implements hook_install().
*/
function menu_ui_install() {
// Rebuild all the menu data.
// @todo - remove this when we understand why removing it breaks the
// standard install profile, possibly need to be handled in
// \Drupal\Core\Extension\ModuleHandler::install().
// @see https://www.drupal.org/node/2181151
\Drupal::service('router.builder')->rebuild();
}
/**
* Implements hook_uninstall().
*/
function menu_ui_uninstall() {
\Drupal::service('router.builder')->setRebuildNeeded();
}
......@@ -32,6 +32,10 @@ function standard_install() {
$user->roles[] = 'administrator';
$user->save();
// We install some menu links, so we have to rebuild the router, to ensure the
// menu links are valid.
\Drupal::service('router.builder')->rebuildIfNeeded();
// Enable the Contact link in the footer menu.
/** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */
$menu_link_manager = \Drupal::service('plugin.manager.menu.link');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment