Copied to clipboard

Flag this post as spam?

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


  • Keld Graugaard 13 posts 34 karma points
    Dec 05, 2014 @ 12:13
    Keld Graugaard
    0

    Error in rendering custom fields

    Hi,

    Been running Newsletterstudio on a website for ages. Instead of using the buildin [unsubscripe] field, i've been using this

    <a href="/afmeld-nyhedsbrev/?email=[email]">Afmeld nyhedsbrev</a>

    It have been working, but recently the field [email] is no longer being substituted with the subscribers email addres.

    The site is recently being upgraded til ver. 1.4.5 and it did not work on 1.4.1 either.

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Dec 08, 2014 @ 10:50
    Markus Johansson
    0

    Hi!

    This should work so it feels like something is going wrong? Do you see any errors in tracelogs och the umbraco log?

    Does the email render correctly?

    [name] and [email] should be replaced by the name and the email of the subscrber. This same placeholders is also used for the built in unsubsubscribe-feature.

    // m 

  • Keld Graugaard 13 posts 34 karma points
    Dec 08, 2014 @ 11:01
    Keld Graugaard
    0

    Yep. Got a bunch of these

    2014-12-05 10:31:32,591 [9] ERROR ASP.global_asax - Exception of type 'System.Web.HttpUnhandledException' was thrown.
    System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
       at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
       at System.String.Format(IFormatProvider provider, String format, Object[] args)
       at System.String.Format(String format, Object[] args)
       at ????????.????????(String ????????, Object[] ????????)
       at NewsletterStudio.Infrastucture.Compression.LegacyEncryptionCompressor.Decompress(String compressedText)
       at NewsletterStudio.Infrastucture.Compression.LegacySimpleAESProxyCompressor.Decompress(String compressedText)
       at NewsletterStudio.Common.Decompress(String compressedText)
       at NewsletterStudio.External.TrackPixel.ProccessQueryString()
       at NewsletterStudio.External.TrackPixel.Page_Load(Object sender, EventArgs e)
       at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
       at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.HandleError(Exception e)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at ASP.umbraco_newsletterstudio_tracking_trackpixel_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\80889c2a\bdd59b18\App_Web_trackpixel.aspx.e621b34f.k4rkc4je.0.cs:line 0
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Dec 08, 2014 @ 11:16
    Markus Johansson
    0

    Hi!

    This should not matter for the process of rendering the email. Do you see anything in the logs when you send out a message? (send to a small test list)

    // m 

  • Keld Graugaard 13 posts 34 karma points
    Dec 08, 2014 @ 12:05
    Keld Graugaard
    0

    Hi marcus,

    Nothing more in the logs. It did some testing, and [email] is rendered correctly in the newsletter, but when it´s used in a link it does´nt.

    And that used to work in previous versions.

    Sincere Keld

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Dec 08, 2014 @ 12:14
    Markus Johansson
    0

    Hi!

    Hmm... so what is the [email]-placeholder replaced by when it is used as a link? Just empty? 

    We use this placeholde for the internal information and we encrypt the email to be used in querystrings etc. If you would like to use the link as you describe you can always implement your own render task and use another placeholder ie. [email-plaintext] and then use a render task to replace this with the accual email.

    http://support.newsletterstudio.org/customer/portal/articles/1052872-control-content-with-render-tasks

    // m 

  • Keld Graugaard 13 posts 34 karma points
    Dec 08, 2014 @ 14:44
    Keld Graugaard
    0

    Thx that worked

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Dec 08, 2014 @ 14:49
    Markus Johansson
    0

    Great news =D

    Just keep me posted if you have any other questions or issues.

    Cheers! 

  • Gonçalo Assunção 39 posts 68 karma points
    Mar 20, 2015 @ 11:21
    Gonçalo Assunção
    0

    I'm having this same problem:

    I want to use the [email] task in a link, but the render task doesn't replace the [email] tag for the user email. It displays: href="http:www.domain.com/link/email=[email]".

    We really need this bug to be fixed. We want to send the client straight to a cancelation page, without them having to fill a form with their email.

    This should work without any problems. 

  • Keld Graugaard 13 posts 34 karma points
    Mar 20, 2015 @ 11:33
    Keld Graugaard
    1

    Goncalo,

    Do the following

    Create a new class:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using NewsletterStudio.Services;
    using NewsletterStudio.Services.RenderTasks;

    namespace myNamespace
    {
       class NewsletterEmailRenderTask : RenderTask
       {
           public override void ProcessPreRender(RenderResult renderResult, RenderTaskParameters parameters)
           {            

            }

            public override void ProcessPreview(RenderResult renderResult, RenderTaskParameters parameters)

            {

                renderResult.MessageBody = renderResult.MessageBody.Replace("[email-plaintext]", "[email protected]");

            }

            public override void ProcessUniqItem(RenderResult renderResult, RenderTaskUniqItemParameters parameters)

            {

                renderResult.MessageBody = renderResult.MessageBody.Replace(System.Web.HttpUtility.UrlEncode("[email-plaintext]"), parameters.EmailTrackingItem.Email);

                base.ProcessUniqItem(renderResult, parameters);

            }

        }

    }

    Create the following in node <emailRenderingTasks> newsletterstudio.config

    <task name="NewsletterEmailRenderTask" type="myNamespace.NewsletterEmailRenderTask, myNamespace" />

    And the following URL wil work: http:www.domain.com/link/email=[email-plaintext]
    //Keld
  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Mar 20, 2015 @ 11:50
    Markus Johansson
    0

    Hi Gonçalo!

    How do you mean that it don't repalce the [email]-placeholder? That should work if your setup is correct.

    Do you see any errors in the log or the trace log?

    How does the <renderTasks>-section of your newsletterstudio.config.file look? Do you have  all tasks configured? 

  • Gonçalo Assunção 39 posts 68 karma points
    Mar 20, 2015 @ 15:21
    Gonçalo Assunção
    0

    The <renderTasks> looks like:

       <emailRenderingTasks>
          <clear />
          <task name="AddTrackingPixelRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.AddTrackingPixelRenderTask, NewsletterStudio" />
          <task name="FitIntoTemplateRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.FitIntoTemplateRenderTask, NewsletterStudio" />
          <task name="RenderUrlRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.RenderUrlRenderTask, NewsletterStudio" />
          <task name="ReplaceUnsubscribeRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.ReplaceUnsubscribeRenderTask, NewsletterStudio" />
          <task name="ReadOnlineRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.ReadOnlineRenderTask, NewsletterStudio" />
          <task name="ReplaceLocalLinksRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.ReplaceLocalLinksRenderTask, NewsletterStudio" />
          <task name="AddFullDomainToRelativeSrcsRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.AddFullDomainToRelativeSrcsRenderTask, NewsletterStudio" />
          <task name="ReplaceRelativeLinksRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.ReplaceRelativeLinksRenderTask, NewsletterStudio" />
          <task name="GoogleAnalyticsRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.GoogleAnalyticsRenderTask, NewsletterStudio" />
          <task name="AddClickTagsRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.AddClickTagsRenderTask, NewsletterStudio" />
          <task name="ReplaceUniqMergeFieldsRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.ReplaceUniqMergeFieldsRenderTask, NewsletterStudio" />
       </emailRenderingTasks>

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Mar 20, 2015 @ 18:34
    Markus Johansson
    0

    Hi! 

    I see! Your configuration looks fine.

    But does all the core features of Newslette Studio work except for the custom link that you have included?

    Looks like the solution that Keld provided is your way forward. 


    / m 

  • Gonçalo Assunção 39 posts 68 karma points
    Mar 20, 2015 @ 18:44
    Gonçalo Assunção
    0

    Yes.

     

    It works in the body of the email, but it doesn't work for the "href".

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Mar 20, 2015 @ 18:48
    Markus Johansson
    0

    Hi! 

    Great the [email] placeholder is used in another way inside the hrefs so if you follow the guide from Keld you'll be fine =D

    / m 

Please Sign in or register to post replies

Write your reply to:

Draft