diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php
index feb4587..a50696b 100644
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php
+++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php
@@ -65,7 +65,11 @@ public static function schema(FieldStorageDefinitionInterface $field_definition)
* {@inheritdoc}
*/
public function isEmpty() {
- return !isset($this->values['value']) || $this->values['value'] === '';
+ $value = $this->getValue();
+ if (!isset($value['value']) || $value['value'] === '') {
+ return TRUE;
+ }
+ return parent::isEmpty();
}
}
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module
index d177860..ba20e0b 100644
--- a/core/modules/shortcut/shortcut.module
+++ b/core/modules/shortcut/shortcut.module
@@ -258,7 +258,7 @@ function shortcut_renderable_links($shortcut_set = NULL) {
$shortcut = \Drupal::entityManager()->getTranslationFromContext($shortcut);
$links[] = array(
'title' => $shortcut->label(),
- 'url' => \Drupal::service('path.validator')->getUrlIfValid($shortcut->path->value),
+ 'url' => Url::fromUri('base://' . $shortcut->path->value),
);
$cache_tags = Cache::mergeTags($cache_tags, $shortcut->getCacheTag());
}
diff --git a/core/modules/system/src/Tests/Common/RenderWebTest.php b/core/modules/system/src/Tests/Common/RenderWebTest.php
index 52dca2d..5e44ec0 100644
--- a/core/modules/system/src/Tests/Common/RenderWebTest.php
+++ b/core/modules/system/src/Tests/Common/RenderWebTest.php
@@ -106,13 +106,13 @@ function testDrupalRenderFormElements() {
$element = array(
'#type' => 'link',
'#title' => $this->randomMachineName(),
- '#url' => Url::fromUri($this->randomMachineName()),
+ '#route_name' => 'common_test.destination',
'#options' => array(
'absolute' => TRUE,
),
);
$this->assertRenderedElement($element, '//a[@href=:href and contains(., :title)]', array(
- ':href' => $element['#url']->toString(),
+ ':href' => \Drupal::urlGenerator()->generateFromPath('common-test/destination', ['absolute' => TRUE]),
':title' => $element['#title'],
));
diff --git a/core/modules/views/src/Plugin/views/field/Links.php b/core/modules/views/src/Plugin/views/field/Links.php
index dc638ff..a248bd6 100644
--- a/core/modules/views/src/Plugin/views/field/Links.php
+++ b/core/modules/views/src/Plugin/views/field/Links.php
@@ -8,6 +8,7 @@
namespace Drupal\views\Plugin\views\field;
use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Url;
/**
* A abstract handler which provides a collection of links.
@@ -79,7 +80,7 @@ protected function getLinks() {
$path = strip_tags(decode_entities(strtr($path, $tokens)));
$links[$field] = array(
- 'url' => \Drupal::service('path.validator')->getUrlIfValid($path),
+ 'url' => Url::fromUri('base://' . $path),
'title' => $title,
);
if (!empty($this->options['destination'])) {
diff --git a/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php b/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php
index 823eabd..df08109 100644
--- a/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php
+++ b/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php
@@ -121,7 +121,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'link' => array(
'#type' => 'link',
'#title' => '' . $this->t('Remove') . '',
- '#url' => Url::fromUri('javascript:void()'),
+ '#route_name' => '',
'#options' => array(
'html' => TRUE,
),