Commit e1a287a5 authored by git's avatar git Committed by Damien McKenna
Browse files

Issue #3105343 by Kionn, DenisCi: Maintenance mode message shown on settings...

Issue #3105343 by Kionn, DenisCi: Maintenance mode message shown on settings forms when site is not in maintenance mode.
parent 697e173d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3,6 +3,8 @@ Metatag 8.x-1.x-dev, xxxx-xx-xx
#3102937 by yasmeensalah, Berdir: Plugin AlternateHandheld is misnamed.
#3103725 by thalles: Create kernel test to Form\MetatagSettingsForm.
#3105837 by Berdir: Remove metatag_install().
#3105343 by Kionn, DenisCi: Maintenance mode message shown on settings forms
  when site is not in maintenance mode.


Metatag 8.x-1.11, 2019-12-20
+3 −2
Original line number Diff line number Diff line
@@ -28,8 +28,9 @@ class MetatagSettingsForm extends ConfigFormBase {
   * {@inheritdoc}
   */
  public function buildForm(array $form, FormStateInterface $form_state) {
    drupal_set_message($this->t('Please note that while the site is in maintenance mode none of the usual meta tags will be output.'));

    if (\Drupal::state()->get('system.maintenance_mode')) {
      \Drupal::messenger()->addMessage($this->t('Please note that while the site is in maintenance mode none of the usual meta tags will be output.'));
    }
    $settings = $this->config('metatag.settings')->get('entity_type_groups');

    $form['entity_type_groups'] = [
+3 −2
Original line number Diff line number Diff line
@@ -144,8 +144,9 @@ class MetatagDefaultsListBuilder extends ConfigEntityListBuilder {
   * {@inheritdoc}
   */
  public function render() {
    drupal_set_message($this->t('Please note that while the site is in maintenance mode none of the usual meta tags will be output.'));

    if (\Drupal::state()->get('system.maintenance_mode')) {
      \Drupal::messenger()->addMessage($this->t('Please note that while the site is in maintenance mode none of the usual meta tags will be output.'));
    }
    return parent::render();
  }