reverted: --- b/core/includes/path.inc +++ a/core/includes/path.inc @@ -96,6 +96,27 @@ return _current_path(); } +/** + * Fetches a specific URL alias from the database. + * + * @param $conditions + * A string representing the source, a number representing the pid, or an + * array of query conditions. + * + * @see \Drupal\Core\Path\PathInterface::load() + */ +function path_load($conditions) { + if (is_numeric($conditions)) { + $conditions = array('pid' => $conditions); + } + elseif (is_string($conditions)) { + $conditions = array('source' => $conditions); + } + elseif (!is_array($conditions)) { + return FALSE; + } + return \Drupal::service('path.alias_storage')->load($conditions); +} /** * Determines whether a path is in the administrative section of the site. reverted: --- b/core/modules/path/lib/Drupal/path/Controller/PathController.php +++ a/core/modules/path/lib/Drupal/path/Controller/PathController.php @@ -24,7 +24,7 @@ * @todo Remove path_admin_edit(). */ public function adminEdit($path) { + $path = path_load($path); - $path = \Drupal::service('path.alias_storage')->load($path); module_load_include('admin.inc', 'path'); return path_admin_edit($path); } only in patch2: unchanged: --- a/core/lib/Drupal/Core/Path/AliasStorage.php +++ b/core/lib/Drupal/Core/Path/AliasStorage.php @@ -82,6 +82,15 @@ public function save($source, $alias, $langcode = Language::LANGCODE_NOT_SPECIFI * {@inheritdoc} */ public function load($conditions) { + if (is_numeric($conditions)) { + $conditions = array('pid' => $conditions); + } + elseif (is_string($conditions)) { + $conditions = array('source' => $conditions); + } + elseif (!is_array($conditions)) { + return FALSE; + } $select = $this->connection->select('url_alias'); foreach ($conditions as $field => $value) { $select->condition($field, $value);