Commit 6748381c authored by gnuget's avatar gnuget Committed by greggles

Issue #2938134 by gnuget: Invalid placeholder (!types) in string

parent 571959a9
......@@ -5,6 +5,7 @@ namespace Drupal\comment_notify\Form;
use Drupal\Component\Utility\Html;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Markup;
use Drupal\field\Entity\FieldConfig;
use Drupal\node\Entity\NodeType;
use Drupal\user\Entity\User;
......@@ -49,8 +50,10 @@ class CommentNotifySettings extends ConfigFormBase {
}
if (!empty($anonymous_problems)) {
drupal_set_message($this->t('Anonymous commenters have the permission to subscribe to comments but cannot leave their contact information on the following content types: !types. You should either disable subscriptions on those types here, revoke the permission for anonymous users, or enable anonymous users to leave their contact information in the comment settings.', [
'!types' => implode(', ', $anonymous_problems),
$markup = new Markup();
$types = $markup->create(implode(', ', $anonymous_problems));
drupal_set_message($this->t('Anonymous commenters have the permission to subscribe to comments but cannot leave their contact information on the following content types: @types. You should either disable subscriptions on those types here, revoke the permission for anonymous users, or enable anonymous users to leave their contact information in the comment settings.', [
'@types' => $types,
]), 'status', FALSE);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment