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)
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.
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;
Hi!
Do you know the value of the SubscriptionId parameter? Is it empty?
/ m
Hi Markus
Thank you for the quick response.
It looks like the SubscriptionId is empty
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
is working on a reply...