Problem/Motivation

core/modules/contact/src/Tests/ContactPersonalTest.php:    $this->assertEqual($mail['subject'], t('[!site-name] !subject', $variables), 'Subject is in sent message.');

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

dawehner created an issue. See original summary.

joshi.rohit100’s picture

Status: Active » Needs review
StatusFileSize
new1.57 KB
dawehner’s picture

Status: Needs review » Closed (duplicate)
plach’s picture

Creeeditz

jaredsmith’s picture

Assigned: Unassigned » jaredsmith
Status: Closed (duplicate) » Active
berdir’s picture

Commenting so that @xjm can give me credit for reading through a 1MB .pot file ;)

sutharsan’s picture

Commenting so that @xjm can give me credit for fighting the Translation template extractor module and having it generating a 1MB .pot file.

dawehner’s picture

Status: Active » Needs work

ignore me

xjm’s picture

Other people who should be credited that haven't commented probably are: justAChris, stefan.r, joelpittet, Ryan Weal.

xjm’s picture

Title: Remove !placeholder in ContactPersonalTest » Remove !placeholder in ContactPersonalTest and Drupal\migrate\Plugin\migrate\id_map\Sql
jaredsmith’s picture

StatusFileSize
new2.41 KB
new731 bytes
jaredsmith’s picture

Status: Needs work » Needs review
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

This looks exactly how it looks like

borisson_’s picture

Reviewed this as well, very straightforward, RTBC++

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/contact/src/Tests/ContactPersonalTest.php
@@ -79,12 +79,12 @@ function testSendPersonalContactMessage() {
+    $this->assertEqual($mail['subject'], t('[@site-name] @subject', $variables), 'Subject is in sent message.');

Needs to call PlainTextOutput::renderFromHtml() on the result of t().

alexpott’s picture

To see why #15 in MailManager we do...

      // Ensure that subject is plain text. By default translated and
      // formatted strings are prepared for the HTML context and email
      // subjects are plain strings.
      if ($message ['subject']) {
        $message ['subject'] = PlainTextOutput::renderFromHtml($message ['subject']);
      }
alexpott’s picture

Priority: Normal » Critical

Removal of !placeholder is critical.

jaredsmith’s picture

Status: Needs work » Needs review
StatusFileSize
new2.47 KB
new1.03 KB

Addressed the issue brought up in comment #15 in ContactPeronsalTest.

Do we need to do something similar in Drupal\migrate\Plugin\migrate\id_map\Sql as well?

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Do we need to do something similar in Drupal\migrate\Plugin\migrate\id_map\Sql as well?

We don't need it.

xjm’s picture

+++ b/core/modules/contact/src/Tests/ContactPersonalTest.php
@@ -83,7 +83,8 @@
-    $this->assertEqual($mail['subject'], t('[@site-name] @subject', $variables), 'Subject is in sent message.');
+    $subject = PlainTextOutput::renderFromHtml(t('[@site-name] @subject', $variables));
+    $this->assertEqual($mail['subject'], $subject, 'Subject is in sent message.');

So this hunk is only a test (no functional change) and this didn't fail on the previous patch, which implies that it doesn't include coverage for markup.

@alexpott told me that test coverage for that would be added in #2575791: Mail subject should not be run through strip_tags().

Waiting on the bot. :)

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 18: 2575599-18.patch, failed testing.

The last submitted patch, 18: 2575599-18.patch, failed testing.

jaredsmith’s picture

Status: Needs work » Needs review
StatusFileSize
new2.71 KB
new495 bytes

Added the missing "use" statement. Sorry about that.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Its actually nice that drupalCI stopped really fast!!

  • xjm committed a85c80f on 8.0.x
    Issue #2575599 by jaredsmith, joshi.rohit100, dawehner, xjm, alexpott,...
xjm’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.0.x. I added credit to folks who helped substantially with finding all the usages to the commit messages, because these are the last ones! Well done.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.