Commit 6a5f9f85 authored by Melissa Bent's avatar Melissa Bent Committed by Alexander Shumenko
Browse files

Issue #3290975: Duplicative text within status messages on save

parent f2d4c35c
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -313,16 +313,15 @@ class ConfigPagesForm extends ContentEntityForm {
    $config_pages->save();
    $context = ['@type' => $config_pages->bundle(), '%info' => $config_pages->label()];
    $logger = $this->logger('config_pages');
    $config_pages_type = $this->configPagesTypeStorage->load($config_pages->bundle());
    $t_args = ['@type' => $config_pages_type->label(), '%info' => $config_pages->label()];
    $t_args = ['%info' => $config_pages->label()];

    if ($insert) {
      $logger->notice('@type: added %info.', $context);
      $this->messenger->addStatus($this->t('@type %info has been created.', $t_args));
      $this->messenger->addStatus($this->t('%info has been created.', $t_args));
    }
    else {
      $logger->notice('@type: updated %info.', $context);
      $this->messenger->addStatus($this->t('@type %info has been updated.', $t_args));
      $this->messenger->addStatus($this->t('%info has been updated.', $t_args));
    }

    if ($config_pages->id()) {