reverted: --- b/core/modules/config_translation/src/Access/ConfigTranslationFormAccess.php +++ a/core/modules/config_translation/src/Access/ConfigTranslationFormAccess.php @@ -8,8 +8,8 @@ namespace Drupal\config_translation\Access; use Drupal\Core\Access\AccessResult; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Session\AccountInterface; +use Symfony\Component\Routing\Route; /** * Checks access for displaying the translation add, edit, and delete forms. @@ -19,10 +19,10 @@ /** * {@inheritdoc} */ + public function access(Route $route, AccountInterface $account, $langcode = NULL) { - public function access(RouteMatchInterface $route_match, AccountInterface $account, $langcode = NULL) { // For the translation forms we have a target language, so we need some // checks in addition to the checks performed for the translation overview. + $base_access = parent::access($route, $account); - $base_access = parent::access($route_match, $account); if ($base_access->isAllowed()) { $target_language = $this->languageManager->getLanguage($langcode); reverted: --- b/core/modules/config_translation/src/Access/ConfigTranslationOverviewAccess.php +++ a/core/modules/config_translation/src/Access/ConfigTranslationOverviewAccess.php @@ -11,8 +11,8 @@ use Drupal\config_translation\ConfigMapperManagerInterface; use Drupal\Core\Access\AccessResult; use Drupal\Core\Routing\Access\AccessInterface; -use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Session\AccountInterface; +use Symfony\Component\Routing\Route; /** * Checks access for displaying the configuration translation overview. @@ -54,20 +54,17 @@ /** * Checks access to the overview based on permissions and translatability. * + * @param \Symfony\Component\Routing\Route $route + * The route to check against. - * @param \Drupal\Core\Routing\RouteMatchInterface $route_match - * The route_match to check against. * @param \Drupal\Core\Session\AccountInterface $account * The currently logged in account. * * @return \Drupal\Core\Access\AccessResultInterface * The access result. */ + public function access(Route $route, AccountInterface $account) { - public function access(RouteMatchInterface $route_match, AccountInterface $account) { - $route = $route_match->getRouteObject(); - /** @var \Drupal\config_translation\ConfigMapperInterface $mapper */ $mapper = $this->configMapperManager->createInstance($route->getDefault('plugin_id')); - $mapper->populateFromRouteMatch($route_match); $this->sourceLanguage = $this->languageManager->getLanguage($mapper->getLangcode()); // Allow access to the translation overview if the proper permission is reverted: --- b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php +++ a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php @@ -660,7 +660,7 @@ $config->save(); // Go to the translation page of the 'files' view. + $translation_url = 'admin/structure/views/view/files/translate/' . $langcode . '/add'; - $translation_url = 'admin/structure/views/view/files/translate/en/add'; $this->drupalGet($translation_url); // Check if the expected number of source elements are present.