Magento2: Email template subjects in foreign language become question marks when saved

Created on 8 May 2018  Â·  7Comments  Â·  Source: magento/magento2

Preconditions

  1. Magento 2.2.4 (upgraded from Magento 2.1.12 successfully)

Steps to reproduce

  1. Go to Marketing -> Email Templates
  2. Edit any template
  3. Put Thai characters in the subject line like "{{trans "ยืนยันคำสั่งซื้อหมายเลข #%increment_id" increment_id=$order.getIncrementId()}}"
  4. Save

Expected result

  1. Thai characters are readable (we had no problems in 2.1.12)

Actual result

  1. {{trans "??????????????????????? #%increment_id" increment_id=$order.getIncrementId()}}

After upgrading to 2.2.4, we lost all our Thai subject lines. We are forced to put them in English for the time being.

Bundled Extension Fixed in 2.2.x Clear Description Confirmed Format is valid

Most helpful comment

Issue doesn't related to Magento code. Can be reproduced even on the 2.2-develop, if you enable Dotmailer extension.

INFO:
Caused by vendor/dotmailer/dotmailer-magento2-extension/Plugin/TemplatePlugin.php
LINES: 103-105

...
                    if ($field == 'template_subject') {
                        $result = utf8_decode($result);
                    }
...

All 7 comments

This issue is also reproduced in Magento 2.2.3 with greek characters.

I confirm this issue too, in 2.2.3.

Before change any record from Marketing -> Email Templates, the records in the database is ok, but in the grid all subject's characters that are note latin (i.e. Greek letters) appear as the issue "Actual result".
After change any record, this record saved as the issue "Actual result" in the database too.
This is also true for the characters out of {{trans }}
(i.e. "ΑΒΓΔΕ{{trans ΑΒΓΔΕ}}" --> "?????{{trans ?????}}")

same in 2.2.5

Hi @jsdupuis the fix for this issue has already been in 2.2-develop branch
selection_021

Issue doesn't related to Magento code. Can be reproduced even on the 2.2-develop, if you enable Dotmailer extension.

INFO:
Caused by vendor/dotmailer/dotmailer-magento2-extension/Plugin/TemplatePlugin.php
LINES: 103-105

...
                    if ($field == 'template_subject') {
                        $result = utf8_decode($result);
                    }
...

Any solution got for this issue? this issue is still present in 2.2.6

Was this page helpful?
0 / 5 - 0 ratings