IssueEmail::getUnsubscribeUrl() should return '#' for test newsletter

Created on 15 March 2023, about 2 years ago

Problem/Motivation

Stack trace when attempting to send test newsletter:

    Deprecated function: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 182 of core/lib/Drupal/Core/Routing/UrlGenerator.php).
    Drupal\Core\Routing\UrlGenerator->doGenerate(Array, Array, Array, Array, Array, 'simplenews.newsletter_confirm_subscription') (Line: 231)
    Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute('simplenews.newsletter_confirm_subscription', Object, Array, Array) (Line: 273)
    Drupal\Core\Routing\UrlGenerator->generateFromRoute('simplenews.newsletter_confirm_subscription', Array, Array, 1) (Line: 105)
    Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('simplenews.newsletter_confirm_subscription', Array, Array, ) (Line: 765)
    Drupal\Core\Url->toString() (Line: 114)
    Drupal\postoffice_simplenews\Email\IssueEmail->getUnsubscribeUrl() (Line: 1570)
    twig_get_attribute(Object, Object, Object, 'unsubscribeUrl', Array, 'any', , , 1, 33) (Line: 53)

Steps to reproduce

Attempt to send a test newsletter.

Proposed resolution

Return '#' from IssueEmail::getUnsubscribeUrl() for test newsletter.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇭Switzerland znerol

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024