diff --git a/core/modules/views/src/Tests/Handler/FieldEntityOperationsTest.php b/core/modules/views/src/Tests/Handler/FieldEntityOperationsTest.php index 8ce1f9b..cdc2da5 100644 --- a/core/modules/views/src/Tests/Handler/FieldEntityOperationsTest.php +++ b/core/modules/views/src/Tests/Handler/FieldEntityOperationsTest.php @@ -51,7 +51,7 @@ public function testEntityOperations() { $operations = \Drupal::entityManager()->getListBuilder('entity_test')->getOperations($entity); foreach ($operations as $operation) { $expected_destination = Url::fromUri('internal:/test-entity-operations')->toString(); - $result = $this->xpath('//ul[contains(@class, dropbutton)]/li/a[contains(@href, :path) and text()=:title]', array(':path' => $operation['url'] . '?destination=' . $expected_destination, ':title' => $operation['title'])); + $result = $this->xpath('//ul[contains(@class, dropbutton)]/li/a[contains(@href, :path) and text()=:title]', array(':path' => $operation['url']->toString() . '?destination=' . $expected_destination, ':title' => $operation['title'])); $this->assertEqual(count($result), 1, t('Found entity @operation link with destination parameter.', array('@operation' => $operation['title']))); } } diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php index 857d7c9..6aed3f0 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -726,7 +726,7 @@ public function renderPreview($display_id, $args = array()) { if (isset($path)) { // @todo Views should expect and store a leading /. See: // https://www.drupal.org/node/2423913 - $path = \Drupal::l($path->toString(), Url::fromUserInput('/' . $path)); + $path = \Drupal::l($path->toString(), $path); } else { $path = t('This display has no path.');