Gemini 5: @Html.Raw() does not work with Stream service
When we create an email Alert Template holding the code @Html.Raw(item.LastComment), no emails are sent and we get an error message in the event log.
If we only use @(item.LastComment), then it works fine (but then html tags are included in the email text).
Is it not possible to use the @Html.Raw() function together with the Stream service?
Marcus Antonsson
· 50 |
|
Tuesday, November 13, 2012, 7:52:58 PM |
0
|
What error do you get in event viewer? |
||||
|
0
|
Copy from the event viewer (please let me know if you prefer the error text in an email):
//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace Countersoft.Foundation.Web.Mvc.Razor { using System;
line hidden
WriteLiteral(" WriteLiteral(" style=\"width: 100%; font-family: arial; font-size: 16px; font-weight: bold; bord" + "er: none; background-color: #8f0929;\""); WriteLiteral(" cellpadding=\"20\""); WriteLiteral(">\r\n\r\n\r\n WriteLiteral(" style=\"color: white;\""); WriteLiteral(">CONDESIGN TRACKER\r\n\r\n\r\n\r\n\r\n WriteLiteral(" style=\"width: 100%; font-family: arial; font-size: 13px; font-weight: normal; bo" + "rder: none; background-color: white;\""); WriteLiteral(" cellpadding=\"10\""); WriteLiteral(">\r\n\r\n\r\n WriteLiteral(" style=\"color: #4c4c4c;\""); WriteLiteral(">Just to let you know that there are ");
WriteLiteral(" changes to your ");
WriteLiteral(" AppNav card.\r\n\r\n\r\n\r\n\r\n"); if (Model.TheItemsCreated.Count > 0) { WriteLiteral("\t WriteLiteral(" style=\"margin: 10px 0 10px 20px;\""); WriteLiteral(">New\r\n"); WriteLiteral("\t WriteLiteral(" style=\"margin-left: 40px; font-family: arial; font-size: 13px; font-weight: norm" + "al; border: none; background-color: white; border-collapse: collapse;\""); WriteLiteral(" cellpadding=\"10\""); WriteLiteral(">\r\n\t\t\r\n"); foreach(var item in Model.TheItemsCreated) { WriteLiteral("\t\t\r\n\t\t\t WriteLiteral(" style=\"color: #4c4c4c; border: 1px solid #f5f5f5; background-color: #f5f5f5; fon" + "t-weight: bold; font-size: 13px;\""); WriteLiteral(">Name:\r\n\t\t\t WriteLiteral(" style=\"border: 1px solid #f5f5f5;\""); WriteLiteral("> WriteAttribute("href", Tuple.Create(" href=\"", 1132), Tuple.Create("\"", 1232) , Tuple.Create(Tuple.Create("", 1139), Tuple.Create(Model.GeminiUrl , 1139), false) , Tuple.Create(Tuple.Create("", 1157), Tuple.Create("project/", 1157), true) , Tuple.Create(Tuple.Create("", 1165), Tuple.Create(item.ProjectCode , 1165), false) , Tuple.Create(Tuple.Create("", 1184), Tuple.Create("/", 1184), true) , Tuple.Create(Tuple.Create("", 1185), Tuple.Create(item.Entity.ProjectId , 1185), false) , Tuple.Create(Tuple.Create("", 1209), Tuple.Create("/item/", 1209), true) , Tuple.Create(Tuple.Create("", 1215), Tuple.Create(item.Entity.Id , 1215), false) ); WriteLiteral(">");
WriteLiteral(" ");
WriteLiteral("\r\n\t\t\r\n"); WriteLiteral("\t\t\r\n\t\t\t WriteLiteral(" style=\"color: #4c4c4c; border: 1px solid #f5f5f5; background-color: #f5f5f5; fon" + "t-weight: bold; font-size: 13px;\""); WriteLiteral(">Status:\r\n\t\t\t WriteLiteral(" style=\"border: 1px solid #f5f5f5;\""); WriteLiteral(">");
WriteLiteral("\r\n\t\t\r\n"); WriteLiteral("\t\t\r\n");
WriteLiteral("\t\r\n\t\r\n"); } WriteLiteral("\r\n"); if (Model.TheItemsUpdated.Count > 0) { WriteLiteral("\t WriteLiteral(" style=\"margin: 10px 0 10px 20px;\""); WriteLiteral(">Changed\t\r\n"); WriteLiteral("\t WriteLiteral(" style=\"margin-left: 40px; font-family: arial; font-size: 13px; font-weight: norm" + "al; border: none; background-color: white; border-collapse: collapse;\""); WriteLiteral(" cellpadding=\"10\""); WriteLiteral(">\r\n\t\t\r\n"); foreach(var item in Model.TheItemsUpdated) { WriteLiteral("\t\t\r\n\t\t\t WriteLiteral(" style=\"color: #4c4c4c; border: 1px solid #f5f5f5; background-color: #f5f5f5; fon" + "t-weight: bold; font-size: 13px;\""); WriteLiteral(">Name:\r\n\t\t\t WriteLiteral(" style=\"border: 1px solid #f5f5f5;\""); WriteLiteral("> WriteAttribute("href", Tuple.Create(" href=\"", 2111), Tuple.Create("\"", 2211) , Tuple.Create(Tuple.Create("", 2118), Tuple.Create(Model.GeminiUrl , 2118), false) , Tuple.Create(Tuple.Create("", 2136), Tuple.Create("project/", 2136), true) , Tuple.Create(Tuple.Create("", 2144), Tuple.Create(item.ProjectCode , 2144), false) , Tuple.Create(Tuple.Create("", 2163), Tuple.Create("/", 2163), true) , Tuple.Create(Tuple.Create("", 2164), Tuple.Create(item.Entity.ProjectId , 2164), false) , Tuple.Create(Tuple.Create("", 2188), Tuple.Create("/item/", 2188), true) , Tuple.Create(Tuple.Create("", 2194), Tuple.Create(item.Entity.Id , 2194), false) ); WriteLiteral(">");
WriteLiteral(" ");
WriteLiteral("\r\n\t\t\r\n"); WriteLiteral("\t\t\r\n\t\t\t WriteLiteral(" style=\"color: #4c4c4c; border: 1px solid #f5f5f5; background-color: #f5f5f5; fon" + "t-weight: bold; font-size: 13px;\""); WriteLiteral(">Status:\r\n\t\t\t WriteLiteral(" style=\"border: 1px solid #f5f5f5;\""); WriteLiteral(">");
WriteLiteral("\r\n\t\t\r\n"); WriteLiteral("\t\t\r\n\t\t\t WriteLiteral(" style=\"color: #4c4c4c; border: 1px solid #f5f5f5; background-color: #f5f5f5; fon" + "t-weight: bold; font-size: 13px;\""); WriteLiteral(">Last comment:\r\n\t\t\t WriteLiteral(" style=\"border: 1px solid #f5f5f5;\""); WriteLiteral(">");
WriteLiteral("\r\n\t\t\r\n"); WriteLiteral("\t\t\r\n");
WriteLiteral("\t\r\n\t\t\r\n"); } WriteLiteral("\r\n"); if (Model.TheItemsCommented.Count > 0) { WriteLiteral("\t WriteLiteral(" style=\"margin: 10px 0 10px 20px;\""); WriteLiteral(">Commented\t\r\n"); WriteLiteral("\t WriteLiteral(" style=\"margin-left: 40px; font-family: arial; font-size: 13px; font-weight: norm" + "al; border: none; background-color: white; border-collapse: collapse;\""); WriteLiteral(" cellpadding=\"10\""); WriteLiteral(">\r\n\t\t\r\n"); foreach(var item in Model.TheItemsCommented) { WriteLiteral("\t\t\r\n\t\t\t WriteLiteral(" style=\"color: #4c4c4c; border: 1px solid #f5f5f5; background-color: #f5f5f5; fon" + "t-weight: bold; font-size: 13px;\""); WriteLiteral(">");
WriteLiteral("\r\n\t\t\t WriteLiteral(" style=\"color: #4c4c4c; border: 1px solid #f5f5f5; font-weight: normal; font-size" + ": 12px;\""); WriteLiteral(">\r\n\t\t\t WriteAttribute("href", Tuple.Create(" href=\"", 3420), Tuple.Create("\"", 3529) , Tuple.Create(Tuple.Create("", 3427), Tuple.Create(Model.GeminiUrl , 3427), false) , Tuple.Create(Tuple.Create("", 3445), Tuple.Create("project/", 3445), true) , Tuple.Create(Tuple.Create("", 3453), Tuple.Create(item.ProjectCode , 3453), false) , Tuple.Create(Tuple.Create("", 3472), Tuple.Create("/", 3472), true) , Tuple.Create(Tuple.Create("", 3473), Tuple.Create(item.Entity.ProjectId , 3473), false) , Tuple.Create(Tuple.Create("", 3497), Tuple.Create("/item/", 3497), true) , Tuple.Create(Tuple.Create("", 3503), Tuple.Create(item.Entity.Id , 3503), false) , Tuple.Create(Tuple.Create("", 3520), Tuple.Create("#comments", 3520), true) ); WriteLiteral(">");
WriteLiteral("\r\n\t\t\t ");
WriteLiteral("\r\n\t\t\r\n");
WriteLiteral("\t\r\n\t");
WriteLiteral("\r\n WriteLiteral(" style=\"font-family: arial; font-size: 13px; font-weight: normal; border: none; b" + "ackground-color: white;\""); WriteLiteral(" cellpadding=\"10\""); WriteLiteral(">\r\n\r\n\r\n WriteLiteral(" style=\"color: #4c4c4c;\""); WriteLiteral(">Thanks.\r\n\r\n\r\n\r\n WriteLiteral(" style=\"width: 100%; font-family: arial; font-size: 11px; font-weight: normal; bo" + "rder: none; background-color: #8f0929;\""); WriteLiteral(" cellpadding=\"5\""); WriteLiteral(">\r\n\r\n\r\n WriteLiteral(" style=\"color: white;\""); WriteLiteral(">Sent by Condesign Issue Tracker System\r\n\r\n\r\n");
} - at Countersoft.Foundation.Web.Mvc.Razor.Compiler.Compile(IEnumerable`1 entries) at Countersoft.Foundation.Web.Mvc.Razor.RazorTemplateGenerator.CompileTemplates() at Countersoft.Foundation.Web.Mvc.Razor.RazorCacheManager.Generate(HtmlHelper html, String templateName, String templateContents, Object parameter, Object resourceManager, Boolean debug) at Countersoft.Gemini.Mailer.AlertsTemplateHelper.GenerateHtml(AlertTemplate template, AlertTypeBaseTemplateModel model) at Countersoft.Gemini.Scheduler.Alerts.AlertsEngine.ProcessAppNavCardAlerts() at Countersoft.Gemini.Scheduler.Alerts.AlertsEngine.Process() |
||||
|
0
|
Thank you, we have identified the issue and are working on a fix (should be out today / tomorrow). |
||||
|
0
|
ANSWER
Please download the patch from: http://www.geminiplatform.com/downloads/v5/StreamPatchv512.zip unblock it and extract the files to the stream folder (overwrite existing ones). Please backup the folder before doing this. |
||||
|
0
|
It works perfectly. Again, thank you! |
||||
|