diff --git a/core/lib/Drupal/Core/Path/PathAliasStorage.php b/core/lib/Drupal/Core/Path/PathAliasStorage.php index a9db234c458..ed765accbcd 100644 --- a/core/lib/Drupal/Core/Path/PathAliasStorage.php +++ b/core/lib/Drupal/Core/Path/PathAliasStorage.php @@ -43,7 +43,8 @@ class PathAliasStorage extends SqlContentEntityStorage { */ public function createWithSampleValues($bundle = FALSE, array $values = []) { $entity = parent::createWithSampleValues($bundle, ['path' => '/'] + $values); - $entity->set('alias', '/' . $entity->get('alias')->value); + // Ensure the alias is only 255 characters long. + $entity->set('alias', substr('/' . $entity->get('alias')->value, 0, 255)); return $entity; }