diff --git a/core/includes/form.inc b/core/includes/form.inc index dd9b4c2..1658e8c 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -369,7 +369,7 @@ function template_preprocess_form(&$variables) { if (!empty($error_links)) { // We need to pass this through String::format() so drupal_set_message() // doesn't encode the links. - $message = \Drupal::translation()->formatPlural(count($error_links), '1 error has been found: !errors', '@count errors have been found: !errors', [ + $message = \Drupal::translation()->formatPlural(count($error_links), '1 error has been found: !errors', '@count errors have been found: !errors', [ '!errors' => implode(', ', $error_links), ]); drupal_set_message($message, 'error'); @@ -457,7 +457,7 @@ function template_preprocess_form_element(&$variables) { $variables['attributes'] = $element['#wrapper_attributes']; } - // Add element #id for #type 'item'. + // Add element #id for #type 'item' and 'password_confirm'. if (isset($element['#markup']) && !empty($element['#id'])) { $variables['attributes']['id'] = $element['#id']; } diff --git a/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php b/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php index eee0cec..40ad21d 100644 --- a/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php +++ b/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php @@ -26,6 +26,7 @@ public function getInfo() { $class = get_class($this); return array( '#input' => TRUE, + '#markup' => '', '#process' => array( array($class, 'processPasswordConfirm'), ),