Skip to content
Snippets Groups Projects
Commit fea79bb2 authored by Adam G-H's avatar Adam G-H
Browse files

Issue #3313717 by phenaproxima, tedbow, balsama: Improve the wording of...

Issue #3313717 by phenaproxima, tedbow, balsama: Improve the wording of UpdateException when re-throwing an ApplyFailedException
parent a272048c
No related branches found
No related tags found
No related merge requests found
......@@ -114,7 +114,7 @@ class Updater extends Stage {
parent::apply($timeout);
}
catch (ApplyFailedException $exception) {
throw new UpdateException([], 'The update operation failed to apply. The update may have been partially applied. It is recommended that the site be restored from a code backup.', $exception->getCode(), $exception);
throw new UpdateException([], "The update operation failed to apply completely. All the files necessary to run Drupal correctly and securely are probably not present. It is strongly recommended to restore your site's code and database from a backup.", $exception->getCode(), $exception);
}
}
......
......@@ -336,7 +336,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
$page->pressButton('Continue');
$this->checkForMetaRefresh();
$assert_session->pageTextContainsOnce('An error has occurred.');
$assert_session->pageTextContains('The update operation failed to apply. The update may have been partially applied. It is recommended that the site be restored from a code backup.');
$assert_session->pageTextContains("The update operation failed to apply completely. All the files necessary to run Drupal correctly and securely are probably not present. It is strongly recommended to restore your site's code and database from a backup.");
$page->clickLink('the error page');
$failure_message = 'Automatic updates failed to apply, and the site is in an indeterminate state. Consider restoring the code and database from a backup.';
......
......@@ -511,7 +511,7 @@ END;
$expected_body = <<<END
Drupal core failed to update automatically from 9.8.0 to 9.8.1. The following error was logged:
The update operation failed to apply. The update may have been partially applied. It is recommended that the site be restored from a code backup.
The update operation failed to apply completely. All the files necessary to run Drupal correctly and securely are probably not present. It is strongly recommended to restore your site's code and database from a backup.
This e-mail was sent by the Automatic Updates module. Unattended updates are not yet fully supported.
......
......@@ -181,7 +181,7 @@ class UpdaterTest extends AutomaticUpdatesKernelTestBase {
Committer::setException(new $thrown_class($thrown_message, 123));
$this->expectException($expected_class);
$expected_message = $expected_class === UpdateException::class ?
'The update operation failed to apply. The update may have been partially applied. It is recommended that the site be restored from a code backup.'
"The update operation failed to apply completely. All the files necessary to run Drupal correctly and securely are probably not present. It is strongly recommended to restore your site's code and database from a backup."
: $thrown_message;
$this->expectExceptionMessage($expected_message);
$this->expectExceptionCode(123);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment