Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jan Molbech 18 posts 109 karma points
    Jun 14, 2017 @ 06:51
    Jan Molbech
    0

    Weird behaviour after upgrading to 2.1.7

    after I've updated to 2.1.7, the ProcessPreRender method places the MessageBody right after the opening bodytag, instead of where the [content] placeholder is in the mail template.

    This produces some fairly strange looking emails.

    I have tried to override the ProcessPreRender method like this

    try
                {
                    var template = GlobalFactory.Current.SkinRepository.GetByAlias(parameters.Newsletter.SkinAlias);
                    if (template != null)
                    {
                        var newBody = template.Content.Replace("[content]", parameters.Newsletter.MessageBody);
                        renderResult.MessageBody = newBody;
                    }
                }
    

    If I check the newBody variable during debugging, the result is as expected. The messagebody is placed correctly instead of the [content] placeholder. But if I check the Renderresult.MessageBody that is passed into the ProcessUniqueItem method, the custom messagebody is now placed right under the body tag (see example)

    <body style="-webkit-text-size-adjust: none;-ms-text-size-adjust: none;margin: 0;padding: 0"> <div>[prices]</div><div>[marketComments]</div><img src="http://s.vindenergi.dk/app_plugins/newsletterstudio/pages/tracking/trackpixel.aspx?nid=065067064110239128255222135110123138224096078187&amp;e=100094239008225165108051176132056210089187189073225212165047201150236144041132207099165246246244" width="1" height="1" alt="Dagens markedsinformation fra Vindenergi Danmark" style="display: block !important" /><table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="border-spacing: 0;border-collapse: collapse"> <tbody><tr>

    The custom messagebody is the 2 divs containing placeholders.

    Anyone else had this problem?

  • Markus Johansson 1910 posts 5734 karma points MVP c-trib
    Jun 14, 2017 @ 10:36
    Markus Johansson
    0

    Hi!

    This is not a known bug and I can't reproduce it so it sounds to me like there is something else going on.

    Do you have any custom render tasks? What happens if you remove them from the configuration, does the content get placed in the right place?

    The underlying code for the render tasks and the render pipeline has not changed in the 2.1.7 release.

    // m

Please Sign in or register to post replies

Write your reply to:

Draft