Problem/Motivation

This issue is related to #2501835: Remove SafeMarkup::set in Drupal\Core\Database\Install\Tasks::runTasks() and ensure multiple messages are printed. While working on https://www.drupal.org/node/2501835, the bug was discovered in HEAD where Tasks.php throws only last database error during site installation instead of displaying all the failed database error messages. The below code has been added into #2501835-22: Remove SafeMarkup::set in Drupal\Core\Database\Install\Tasks::runTasks() and ensure multiple messages are printed.

+  if ($failure) {
+      $message = array(
+        'error' => array(
+          '#markup' => t('Resolve all issues below to continue the installation. For help configuring your database server, see the <a href="https://www.drupal.org/getting-started/install">installation handbook</a>, or contact your hosting provider.'),
+        ),
+        'item_list' => array(
+          '#theme' => 'item_list',
+          '#items' => $error,
+        ),
+      );
+      $message = \Drupal::service('renderer')->render(($message), 'error');

Proposed resolution

Add the test coverage for displaying multiple database error messages.

Remaining tasks

 

Contributor tasks needed
Task Novice task? Contributor instructions Complete?
Create a patch Instructions
Add automated tests Instructions

User interface changes

None

API changes

None

Data model changes

Comments

kgoel’s picture

kgoel’s picture

Issue summary: View changes
Issue tags: +Needs tests
kgoel’s picture

Status: Postponed » Closed (duplicate)