diff -u b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php --- b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php @@ -198,13 +198,14 @@ // Generate link for module's configuration page, if it has one. $row['links']['configure'] = array(); if ($module->status && isset($module->info['configure'])) { - if ($this->accessManager->checkNamedRoute($module->info['configure'], array(), \Drupal::currentUser())) { - $route_parameters = isset($module->info['configure_parameters']) ? $module->info['configure_parameters'] : array(); + $route_parameters = isset($module->info['configure_parameters']) ? $module->info['configure_parameters'] : array(); + if ($this->accessManager->checkNamedRoute($module->info['configure'], $route_parameters, \Drupal::currentUser())) { $item = menu_get_item(trim($this->url($module->info['configure'], $route_parameters), '/')); $row['links']['configure'] = array( '#type' => 'link', '#title' => $this->t('Configure'), '#route_name' => $module->info['configure'], + '#route_parameters' => $route_parameters, '#options' => array( 'attributes' => array( 'class' => array('module-link', 'module-link-configure'), only in patch2: unchanged: --- /dev/null +++ b/core/modules/system/lib/Drupal/system/Tests/Form/ModuleListFormWebTest.php @@ -0,0 +1,44 @@ + '', + 'name' => '\Drupal\system\Form\ModulesListForm web test', + 'group' => 'Module', + ); + } + + /** + * Tests the form. + */ + function testForm() { + $user = $this->drupalCreateUser(array('administer modules')); + $this->drupalLogin($user); + $this->drupalGet('admin/modules'); + $this->assertResponse('200'); + + // Check that system_test's configure link was rendered correctly. + $this->assertLinkByHref('configure/bar'); + } +} only in patch2: unchanged: --- a/core/modules/system/tests/modules/system_test/system_test.info.yml +++ b/core/modules/system/tests/modules/system_test/system_test.info.yml @@ -5,3 +5,6 @@ package: Testing version: VERSION core: 8.x hidden: true +configure: system_test.configure +configure_parameters: + foo: bar only in patch2: unchanged: --- a/core/modules/system/tests/modules/system_test/system_test.module +++ b/core/modules/system/tests/modules/system_test/system_test.module @@ -69,6 +69,9 @@ function system_test_system_info_alter(&$info, $file, $type) { if ($file->name == 'requirements1_test' || $file->name == 'requirements2_test') { $info['hidden'] = FALSE; } + if ($file->name == 'system_test') { + $info['hidden'] = FALSE; + } } /** only in patch2: unchanged: --- a/core/modules/system/tests/modules/system_test/system_test.routing.yml +++ b/core/modules/system/tests/modules/system_test/system_test.routing.yml @@ -80,3 +80,8 @@ system_test.shutdown_functions: _content: '\Drupal\system_test\Controller\SystemTestController::shutdownFunctions' requirements: _access: 'TRUE' + +system_test.configure: + path: '/system-test/configure/{foo}' + requirements: + _access: 'TRUE'