Home Home
  login

Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Gemini 5: Error Message for Alert Templates

usage
emails

There are currently 4 Alert Templates that came as standard.

'When watched items change' and 'When something in the AppNav Card changes' templates appear to be working correctly. When I go to make a change to the 'When new things are added' template I receive the following error message where I should see a preview:

Object reference not set to an instance of an object., at Countersoft.Foundation.Web.Mvc.Razor.Rzr26e4dfef2b674c5fa7631c40e6a72871Template.Execute() at Countersoft.Foundation.Web.Mvc.Razor.RazorTemplateGenerator.GenerateOutput(HtmlHelper html, Object model, String templateName, Type modelType, Object resourceManager) at System.Dynamic.UpdateDelegates.UpdateAndExecute6[T0,T1,T2,T3,T4,T5,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) at CallSite.Target(Closure , CallSite , RazorTemplateGenerator , HtmlHelper , Object , String , Type , Object ) at Countersoft.Foundation.Web.Mvc.Razor.RazorTemplateGenerator.GenerateOutput(HtmlHelper html, Object model, Type modelType, Object resourceManager) at System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) at CallSite.Target(Closure , CallSite , IRazorTemplateGenerator , HtmlHelper , Object , Type , Object ) 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.Mailer.AlertsTemplateHelper.Build(AlertTemplate template, IssueDto issue, UserDto recepient) at Countersoft.Gemini.Models.Admin.SystemAlertTemplatesModelBuilder.SaveData()

When trying to change the 'When someone is resourced' template I receive the following error when looking at the preview:

Object reference not set to an instance of an object., at Countersoft.Foundation.Web.Mvc.Razor.Rzr75683c6676f543bebf42939ea0777628Template.Execute() at Countersoft.Foundation.Web.Mvc.Razor.RazorTemplateGenerator.GenerateOutput(HtmlHelper html, Object model, String templateName, Type modelType, Object resourceManager) at System.Dynamic.UpdateDelegates.UpdateAndExecute6[T0,T1,T2,T3,T4,T5,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) at CallSite.Target(Closure , CallSite , RazorTemplateGenerator , HtmlHelper , Object , String , Type , Object ) at Countersoft.Foundation.Web.Mvc.Razor.RazorTemplateGenerator.GenerateOutput(HtmlHelper html, Object model, Type modelType, Object resourceManager) at System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) at CallSite.Target(Closure , CallSite , IRazorTemplateGenerator , HtmlHelper , Object , Type , Object ) 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.Mailer.AlertsTemplateHelper.Build(AlertTemplate template, IssueDto issue, UserDto recepient) at Countersoft.Gemini.Models.Admin.SystemAlertTemplatesModelBuilder.SaveData()

Any help would be much appreciated.

Kind regards, Nico Kearns

Nico A. Kearns
· 12
Nico A. Kearns
Replies (13)
helpful
0
not helpful

It seems like you have changed that template, can you post the change?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

I have checked the HTML code for both items that are failing and the code is fine. The code has not been changed. I am assuming it must relate to once the references.


Nico A. Kearns
· 12
Nico A. Kearns
helpful
0
not helpful

If you are getting an error when testing the template then the contents are wrong send them to us.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful
GEMINI TRACKER Just to let you know that a new @(Model.TheItem.Type) has been added to @(Model.TheItem.ProjectName). @(Model.TheItem.IssueKey) @(Model.TheItem.Title) Status: @(Model.TheItem.Status) Resourced: @(Model.TheItem.ResourceNames) @Html.Raw(Model.LinkViewItem) Thanks.

Sent by Countersoft Gemini v@(Model.Version


Nico A. Kearns
· 12
Nico A. Kearns
helpful
0
not helpful
<table style="width: 100%; font-family: arial; font-size: 16px; font-weight: bold; border: none; background-color: #8f0929;" cellpadding="20">

GEMINI TRACKER

Just to let you know that a new @(Model.TheItem.Type) has been added to @(Model.TheItem.ProjectName). @(Model.TheItem.IssueKey) @(Model.TheItem.Title) Status: @(Model.TheItem.Status) Resourced: @(Model.TheItem.ResourceNames) @Html.Raw(Model.LinkViewItem) Thanks.

Sent by Countersoft Gemini v@(Model.Version


Nico A. Kearns
· 12
Nico A. Kearns
helpful
0
not helpful
<table style="width: 100%; font-family: arial; font-size: 16px; font-weight: bold; border: none; background-color: #8f0929;" cellpadding="20">

GEMINI TRACKER

Just to let you know the following @(Model.TheItem.Type) in @(Model.TheItem.ProjectName) has been assigned to you: @(Model.TheItem.IssueKey) @(Model.TheItem.Title) Status: @(Model.TheItem.Status) Resourced: @(Model.TheItem.ResourceNames) @Html.Raw(Model.LinkViewItem) Thanks.

Sent by Countersoft Gemini v@(Model.Version


Nico A. Kearns
· 12
Nico A. Kearns
helpful
0
not helpful

Which version of Gemini 5 are you running? The template is working fine for us.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

We are using Gemini 5.1.2


Nico A. Kearns
· 12
Nico A. Kearns
helpful
0
not helpful

Can you please send us your database (support@countersoft.com)?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Is there anything else we could potentially do prior to us sending you our database? Would a series of screenshots help and if so from which screens?

Kind regards, Nico Kearns


Nico A. Kearns
· 12
Nico A. Kearns
helpful
0
not helpful

Not really as we have tried the template you have posted and it works. Now unless it is the wrong template the next step is to get the database over for us to test.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

OK. After removing the object references and then adding them again one-by-one until the error reoccurred I was able to see that the issue was caused by:

@Html.Raw(Model.LinkViewItem)

Any ideas?

Kind regards, Nico Kearns


Nico A. Kearns
· 12
Nico A. Kearns
helpful
0
not helpful

Are you sure you are on 5.1.2? Did you upgarde but not copy all files?


Mark Wing
· 9108
Mark Wing