Core and composer updates
This commit is contained in:
parent
a82634bb98
commit
62cac30480
1118 changed files with 21770 additions and 6306 deletions
|
@ -30,7 +30,7 @@ process:
|
|||
index:
|
||||
- 1
|
||||
-
|
||||
plugin: migration
|
||||
plugin: migration_lookup
|
||||
migration: d6_node_translation
|
||||
destination:
|
||||
plugin: url_alias
|
||||
|
|
|
@ -28,7 +28,7 @@ process:
|
|||
index:
|
||||
- 1
|
||||
-
|
||||
plugin: migration
|
||||
plugin: migration_lookup
|
||||
migration: d7_node_translation
|
||||
destination:
|
||||
plugin: url_alias
|
||||
|
|
|
@ -87,12 +87,12 @@ class PathWidget extends WidgetBase {
|
|||
// Validate that the submitted alias does not exist yet.
|
||||
$is_exists = \Drupal::service('path.alias_storage')->aliasExists($alias, $element['langcode']['#value'], $element['source']['#value']);
|
||||
if ($is_exists) {
|
||||
$form_state->setError($element, t('The alias is already in use.'));
|
||||
$form_state->setError($element['alias'], t('The alias is already in use.'));
|
||||
}
|
||||
}
|
||||
|
||||
if ($alias && $alias[0] !== '/') {
|
||||
$form_state->setError($element, t('The alias needs to start with a slash.'));
|
||||
$form_state->setError($element['alias'], t('The alias needs to start with a slash.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -356,6 +356,22 @@ class PathAliasTest extends PathTestBase {
|
|||
$this->drupalPostForm('node/' . $node_two->id() . '/edit', $edit, t('Save'));
|
||||
$this->assertText(t('The alias is already in use.'));
|
||||
$this->assertFieldByXPath("//input[@name='path[0][alias]' and contains(@class, 'error')]", $edit['path[0][alias]'], 'Textfield exists and has the error class.');
|
||||
|
||||
// Behavior here differs with the inline_form_errors module enabled.
|
||||
// Enable the inline_form_errors module and try this again. This module
|
||||
// improves validation with a link in the error message(s) to the fields
|
||||
// which have invalid input.
|
||||
$this->assertTrue($this->container->get('module_installer')->install(['inline_form_errors'], TRUE), 'Installed inline_form_errors.');
|
||||
// Attempt to edit the second node again, as before.
|
||||
$this->drupalPostForm('node/' . $node_two->id() . '/edit', $edit, t('Preview'));
|
||||
// This error should still be present next to the field.
|
||||
$this->assertSession()->pageTextContains(t('The alias is already in use.'), 'Field error found with expected text.');
|
||||
// The validation error set for the page should include this text.
|
||||
$this->assertSession()->pageTextContains(t('1 error has been found: URL alias'), 'Form error found with expected text.');
|
||||
// The text 'URL alias' should be a link.
|
||||
$this->assertSession()->linkExists('URL alias');
|
||||
// The link should be to the ID of the URL alias field.
|
||||
$this->assertSession()->linkByHrefExists('#edit-path-0-alias');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ class MigrateUrlAliasTest extends MigrateDrupal6TestBase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $modules = ['language', 'content_translation', 'path'];
|
||||
public static $modules = ['language', 'content_translation', 'path', 'menu_ui'];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
|
|
@ -17,6 +17,7 @@ class MigrateUrlAliasTest extends MigrateDrupal7TestBase {
|
|||
public static $modules = [
|
||||
'content_translation',
|
||||
'language',
|
||||
'menu_ui',
|
||||
'node',
|
||||
'path',
|
||||
'text',
|
||||
|
|
Reference in a new issue