Loading core/modules/path/src/PathAliasListBuilder.php +5 −5 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Drupal\path; use Drupal\Component\Utility\Unicode; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityListBuilder; use Drupal\Core\Entity\EntityStorageInterface; Loading Loading @@ -168,13 +167,14 @@ public function buildRow(EntityInterface $entity) { $row['data']['alias']['data'] = [ '#type' => 'link', '#title' => Unicode::truncate($alias, 50, FALSE, TRUE), '#url' => $url->setOption('attributes', ['title' => $alias]), '#title' => $alias, '#url' => $url, ]; $row['data']['path']['data'] = [ '#type' => 'link', '#title' => Unicode::truncate($path, 50, FALSE, TRUE), '#url' => $url->setOption('attributes', ['title' => $path]), '#title' => $path, '#url' => $url, ]; if ($this->languageManager->isMultilingual()) { Loading core/modules/path/tests/src/Functional/PathAliasTest.php +2 −6 Original line number Diff line number Diff line Loading @@ -174,14 +174,10 @@ public function testAdminAlias() { $edit['path[0][value]'] = '/node/' . $node1->id(); $alias = '/' . $this->randomMachineName(128); $edit['alias[0][value]'] = $alias; // The alias is shortened to 50 characters counting the ellipsis. $truncated_alias = substr($alias, 0, 47); $this->drupalGet('admin/config/search/path/add'); $this->submitForm($edit, 'Save'); // The untruncated alias should not be found. $this->assertSession()->pageTextNotContains($alias); // The 'truncated' alias will always be found. $this->assertSession()->pageTextContains($truncated_alias); // The alias will always be found. $this->assertSession()->pageTextContains($alias); // Create third test node. $node3 = $this->drupalCreateNode(); Loading Loading
core/modules/path/src/PathAliasListBuilder.php +5 −5 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Drupal\path; use Drupal\Component\Utility\Unicode; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityListBuilder; use Drupal\Core\Entity\EntityStorageInterface; Loading Loading @@ -168,13 +167,14 @@ public function buildRow(EntityInterface $entity) { $row['data']['alias']['data'] = [ '#type' => 'link', '#title' => Unicode::truncate($alias, 50, FALSE, TRUE), '#url' => $url->setOption('attributes', ['title' => $alias]), '#title' => $alias, '#url' => $url, ]; $row['data']['path']['data'] = [ '#type' => 'link', '#title' => Unicode::truncate($path, 50, FALSE, TRUE), '#url' => $url->setOption('attributes', ['title' => $path]), '#title' => $path, '#url' => $url, ]; if ($this->languageManager->isMultilingual()) { Loading
core/modules/path/tests/src/Functional/PathAliasTest.php +2 −6 Original line number Diff line number Diff line Loading @@ -174,14 +174,10 @@ public function testAdminAlias() { $edit['path[0][value]'] = '/node/' . $node1->id(); $alias = '/' . $this->randomMachineName(128); $edit['alias[0][value]'] = $alias; // The alias is shortened to 50 characters counting the ellipsis. $truncated_alias = substr($alias, 0, 47); $this->drupalGet('admin/config/search/path/add'); $this->submitForm($edit, 'Save'); // The untruncated alias should not be found. $this->assertSession()->pageTextNotContains($alias); // The 'truncated' alias will always be found. $this->assertSession()->pageTextContains($truncated_alias); // The alias will always be found. $this->assertSession()->pageTextContains($alias); // Create third test node. $node3 = $this->drupalCreateNode(); Loading