Copied to clipboard

Flag this post as spam?

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


  • Casper 9 posts 29 karma points
    Jan 21, 2015 @ 15:00
    Casper
    0

    Error after upgrade

    Hi

    I have a problem after upgrading from version 1.3.4 to version 1.4.5.

    A user can no longer subscribe to the newsletter. If i enter an email and click "subscribe" i get the following error:

    Error Loading Razor Script (file: Newsletter Subscribe) Input string was not in a correct format.    at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
      at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
      at CallSite.Target(Closure , CallSite , Type , Object )
      at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
      at ASP._Page_macroScripts_NewsletterSubscribe_cshtml.Execute() in c:....\macroScripts\NewsletterSubscribe.cshtml:line 27
      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
      at System.Web.WebPages.WebPage.ExecutePageHierarchy()
      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
      at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
      at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)

    I think it's this line that fails:

    Int32 subscriptionId = (Parameter.SubscriptionId != null) ? Convert.ToInt32(Parameter.SubscriptionId) : 0;

  • Markus Johansson 1918 posts 5785 karma points MVP c-trib
    Jan 21, 2015 @ 16:45
    Markus Johansson
    0

    Hi!

    Do you know the value of the SubscriptionId parameter? Is it empty?

    / m 

  • Casper 9 posts 29 karma points
    Jan 22, 2015 @ 08:20
    Casper
    0

    Hi Markus

    Thank you for the quick response. 

     

    It looks like the SubscriptionId is empty

  • Markus Johansson 1918 posts 5785 karma points MVP c-trib
    Jan 23, 2015 @ 11:10
    Markus Johansson
    0

    Hi!

    Okey. Thats a parameter that is configured on the macro. You could hardcode the value if you want to or you'll need to configure the macro parameters correctly.

    If you need to see how it works I would recommend you to install a clean version of Newsletter Studio in a clean Umbraco-instance and look at the macro.

    Cheers! 

    / m

Please Sign in or register to post replies

Write your reply to:

Draft