ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

DB encoding issue with emails since upgrading to EE 1.7.0

October 23, 2010 9:53pm

Subscribe [9]
  • #1 / Oct 23, 2010 9:53pm

    JCDerrick

    57 posts

    At first I thought maybe this was something I did when I upgraded, but it’s now happen on two separate servers when I upgraded from EE 1.6.9 to EE 1.7.0. One server is an IIS server we use at work, and the other is a Linux server I use for personal websites.

    This currently seems to only happen with emails, though I suspect it may be happening elsewhere. Emails that used to look like this in my inbox:
    “You have received a new post at - whatever topic”

    now look like this…

    “You_have_received_a_new_post_at_-_whatever_topic”

    It happens no matter what email address the notifications are sent too. Any suggestions on how we can fix this? In EE the Default Character Set is utf-8 for both installations.

    Thanks,
    John

  • #2 / Oct 24, 2010 4:53pm

    Greg Salt

    3988 posts

    Hi John,

    I’m just checking with the rest of team about this and we will respond as soon as we can.

    Cheers

    Greg

  • #3 / Oct 24, 2010 7:48pm

    mayest

    293 posts

    Just chiming in to note that I see exactly the same thing on a Linux server (EngineHosting). Just upgraded today, and tried adding a new member as a test. Notification emails to me as Admin and me as new user both had underlines instead of spaces in email subject line. The notification templates look normal.

    Tim

    EDIT: Looks like Silenz noticed the same thing, and maybe the problem?

  • #4 / Oct 25, 2010 10:13am

    Sue Crocker

    26054 posts

    Yup, there have been three reports so far, and Greg can replicate the problem as well. He forwarded this thread to the Dev team for additional info. Thanks in advance for your patience.

  • #5 / Oct 26, 2010 2:51pm

    JCDerrick

    57 posts

    Thanks for all your help guys and for looking into this, we appreciate it. I noticed it happened on my EngineHosting account yesterday as well, so that makes for three servers on my end with the issue. Thank you all for confirming it was happening elsewhere. Hopefully a fix is in the works.

    On a side note, I seem to remember this happening on one of my larger sites when I upgraded to 1.6.9, and then quickly reverted back. I’m wondering if it’s the same issue now.

    -John

  • #6 / Oct 27, 2010 3:32am

    John Henry Donovan

    12339 posts

    Still looking into this one. Thanks again for your patience

  • #7 / Oct 27, 2010 3:48pm

    mayest

    293 posts

    John, thanks for looking in to this. Just a note to say that emails sent from FreeForm are not doing the underlining thing. I don’t know what the difference is between FreeForm and the standard EE emails, but FreeForm isn’t affected.

  • #8 / Oct 27, 2010 3:56pm

    HawaiiMotion

    1 posts

    Removed Post

  • #9 / Oct 27, 2010 3:58pm

    JCDerrick

    57 posts

    The above was me under my work account, sorry.

    Freeform seems to have it’s own way of sending emails. I say that because we’ve run into another interesting problem with Freeform vs. standard EE emails. And they clearly have their own unique methods of sending emails.

    To explain, first I should point out that we host our email off site from our server, and that seems to be the root of the issue. When email is hosted within our server’s system (on this particular IIS host), Freeform, EE emails, etc all work fine. As I noted, it’s also an IIS sever, which may account for some issues. But here’s the jist of how I know they work separately.

    When using phpMail Freeform does NOT work on our server - to any email address, internal or not. Internal mail to our domain also doesn’t work for any of the EE templates. However external email addresses can receive email send from EE (other than Freeform).

    When using STMP Freeform works ONLY for internal email, but not external. EE emails also work internally, but not externally.

    So, in our case, Freeform has some issues with our email settings being off-site and phpMail being used. It’s another problem entirely and one I haven’t posted about yet. We’re moving to Engine Hosting and I suspect that’s going to solve our issues promptly.

    But it proves that Freeform and EE emails are clearly send using different methods.

  • #10 / Oct 28, 2010 4:27pm

    Ingmar

    29245 posts

    Our devs are still looking into this. Thanks for your patience.

  • #11 / Nov 01, 2010 3:42pm

    Robin Sowell

    13255 posts

    It looks like a fix for a rare encoding issue interfered with the subjects.  A more permanent fix has been committed for the next release.  For the short term, I’d suggest a change to system/core/core.email.php around line 836, replace:

    if (preg_match('/[^\x00-\x7F]/', $str))
    {
        $str = trim(preg_replace('/^(.*)$/m', ' =?'.$PREFS->ini('charset').'?Q?$1?=', $str));
    }
    else
    {
        $str = trim($str);
    }

    with

    $str = trim(preg_replace('/^(.*)$/m', ' =?'.$PREFS->ini('charset').'?Q?$1?=', $str));

    Make sense?  And does that do the trick for you?

  • #12 / Nov 01, 2010 3:48pm

    JCDerrick

    57 posts

    Thanks, that appears to have worked. I will confirm when another email comes through. But my test via the Communicate tab worked without the spaces.

    -John

  • #13 / Nov 02, 2010 5:03am

    John Henry Donovan

    12339 posts

    John, great. Let us know when the other email comes through.

  • #14 / Nov 21, 2010 12:11am

    JCDerrick

    57 posts

    Just wanted to confirm for you guys I’ve tried this now on multiple 1.7.0 installations after upgrading (each which had the underscore problem post-upgrade) and the above fix works on ALL of them. So this definitely solved the problem.

    Thanks for your help on this guys, I really do appreciate it.

    -John

  • #15 / Nov 21, 2010 4:46pm

    Greg Salt

    3988 posts

    Hi John,

    Thanks for updating us and glad that it’s now working correctly. Please post back if you have further questions or problems.

    Cheers

    Greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases