From ad302e36e30ec3f6404752b2a5aea0f4da587795 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Thu, 9 Oct 2014 08:03:49 +0100 Subject: [PATCH] Revert "Issue #2349651 by yannisc, larowlan: Fixed Default contact form does not send email as email recipient is not set during the installation." This reverts commit 62f8b460fe4ad9076f680f0801111526490551cd. --- core/profiles/standard/src/Tests/StandardTest.php | 5 ----- core/profiles/standard/standard.profile | 10 ---------- 2 files changed, 15 deletions(-) diff --git a/core/profiles/standard/src/Tests/StandardTest.php b/core/profiles/standard/src/Tests/StandardTest.php index 3ba23477b03a..b05285eb3f1b 100644 --- a/core/profiles/standard/src/Tests/StandardTest.php +++ b/core/profiles/standard/src/Tests/StandardTest.php @@ -8,7 +8,6 @@ namespace Drupal\standard\Tests; use Drupal\config\Tests\SchemaCheckTestTrait; -use Drupal\contact\Entity\ContactForm; use Drupal\simpletest\WebTestBase; /** @@ -113,10 +112,6 @@ function testStandard() { \Drupal::moduleHandler()->uninstall(array('editor', 'ckeditor')); $this->rebuildContainer(); \Drupal::moduleHandler()->install(array('editor')); - /** @var \Drupal\contact\ContactFormInterface $contact_form */ - $contact_form = ContactForm::load('feedback'); - $recipients = $contact_form->getRecipients(); - $this->assertEqual(['simpletest@example.com'], $recipients); } } diff --git a/core/profiles/standard/standard.profile b/core/profiles/standard/standard.profile index ad69906d6d37..4af64566e475 100644 --- a/core/profiles/standard/standard.profile +++ b/core/profiles/standard/standard.profile @@ -4,7 +4,6 @@ * Enables modules and site configuration for a standard site installation. */ -use Drupal\contact\Entity\ContactForm; use Drupal\Core\Form\FormStateInterface; /** @@ -15,13 +14,4 @@ function standard_form_install_configure_form_alter(&$form, FormStateInterface $form_state) { // Pre-populate the site name with the server name. $form['site_information']['site_name']['#default_value'] = \Drupal::request()->server->get('SERVER_NAME'); - $form['#submit'][] = 'standard_form_install_configure_submit'; -} - -/** - * Submission handler to sync the contact.form.feedback recipient. - */ -function standard_form_install_configure_submit($form, FormStateInterface $form_state) { - $site_mail = $form_state->getValue('site_mail'); - ContactForm::load('feedback')->setRecipients([$site_mail])->save(); } -- GitLab