Commit 7e46d3cd authored by Eelke Blok's avatar Eelke Blok
Browse files

Issue #3075149 by eelkeblok: Correct explanation of "Enable testing mode" checkbox

parent 99e0271c
Loading
Loading
Loading
Loading
+4 −14
Original line number Diff line number Diff line
@@ -58,20 +58,10 @@ in the form submission (at all).

-- TESTING --

Do NOT test Akismet without enabling the testing mode. Doing so would negatively
affect your own author reputation across all sites in the Akismet network.

To test Akismet:

* Go to Administration » Configuration » Content authoring » Akismet » Settings.

* Enable the "Testing mode" option.
  Note: Ensure to read the difference in behavior.

* Log out or switch to a different user, and perform your tests.

* Disable the testing mode once you're done with testing.

You may test Akismet without too much risk. In order to simulate a positive
(spam) result, set the comment author to "viagra-test-123" or comment author
email to "akismet-guaranteed-spam@example.com". For further details, refer to
the [Akismet API documentation](https://akismet.com/development/api/#detailed-docs).

-- FAQ --

+8 −8
Original line number Diff line number Diff line
@@ -85,14 +85,6 @@ class Settings extends ConfigFormBase {
      '#description' => $this->t('Only applies to forms protected with text analysis. When disabling this option, you should inform visitors about the privacy of their data through other means.'),
    ];

    $form['testing_mode'] = [
      '#type' => 'checkbox',
      '#title' => t('Enable testing mode'),
      '#return_value' => TRUE,
      '#default_value' => $config->get('test_mode.enabled'),
      '#description' => $this->t('Submitting "ham", "unsure", or "spam" triggers the corresponding behavior; image CAPTCHAs only respond to "correct" and audio CAPTCHAs only respond to "demo". Do not enable this option if this site is publicly accessible.'),
    ];

    $form['advanced'] = [
      '#type' => 'details',
      '#title' => $this->t('Advanced configuration'),
@@ -118,6 +110,14 @@ class Settings extends ConfigFormBase {
      '#field_suffix' => $this->t('seconds'),
      '#required' => TRUE,
    ];
    $form['advanced']['testing_mode'] = [
      '#type' => 'checkbox',
      '#title' => t('Enable testing mode'),
      '#return_value' => TRUE,
      '#default_value' => $config->get('test_mode.enabled'),
      '#description' => $this->t('Let Akismet know you are testing. This is mostly useful for somewhat repeatable test results for automated testing. For details and triggering guaranteed spam responses (regardless of using test mode), refer to the <a href="https://akismet.com/development/api/#detailed-docs">Akismet API documentation</a>.'),
    ];

    return parent::buildForm($form, $form_state);
  }