Commit 89a4c2e7 authored by Johannes  Kowald's avatar Johannes Kowald Committed by Sven Berg Ryen
Browse files

Issue #3255438 by JoCowood, slowflyer: Broken Title on newsletter editions

parent 00f8d02c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Link;
use Drupal\Core\Url;
use Drupal\node\NodeInterface;
use Drupal\filter\Render\FilteredMarkup;

/**
 * NEWSLETTER SEND COMMAND.
@@ -594,6 +595,7 @@ function _simplenews_scheduler_new_edition($nid, $edition_time) {
    ->condition('nid', $template_node->id())
    ->execute()
    ->fetchAssoc();
  $edition_node->set('title', FilteredMarkup::create($edition_node->label()));
  $edition_node->title = Drupal::token()->replace($schedrecord['title'], ['node' => $edition_node]);

  // Implement the token replacement in the newsletter translations.