Video Screencast Help

List E-mail Message Templates page is blank

Created: 27 Mar 2013 • Updated: 04 Apr 2013 | 5 comments
This issue has been solved. See solution.

Today I went to "Admin > E-mail Templates > List E-mail Message Templates" and the page is completely blank! I only have the "New" option to create a new E-mail Template.

I looked at the email_message table in the Altiris_Incidents database and all of them are listed in there. If I edit or create a Notify Rule, all of them are listed in the 'Send e-mail' drop-down list. The last time I was in there and saw the list populated was just two days ago and there have been no changes to the environment at all. All the Notify Rules seem to be working fine too, sending the correct template depending on the different rules applied.

Anyone ever seen this and know how to fix it or have any suggestions on what to do to fix it?


Operating Systems:

Comments 5 CommentsJump to latest comment

The Gaffer's picture

Have you tried accessing the console using a different user account with admin rights? If that account can view the Email templates then the problems is almost certainly that your 'tag' which defines the columns displayed in the grid on the List E-mail Message Templates page is corrupt. To clear this tag for all users, you can simply delete it for all users by running this SQL query:

DELETE dbo.[tag] WHERE [name] = 'EmailTemplateList_columns'

This is the most likely cause of the issue you are seeing.

If neither user can see the grid and clearing the tag does not fix the issue, the next most likely possibility is that the query table has been corrupted.

Try running,

SELECT * FROM [query] WHERE [name]='EmailMessageLimited'

This should have the expression:

SELECT email_message_id, email_message_name, email_message_comment, email_message_status, email_message_type, email_message_is_html  FROM email_message_view

If none of these suggestions allow you to correct the issue, then we will have to investigate further.

matzebru's picture

Thanks for the suggestions!

I did have the same issue with the other Admin account I tested with, but to be sure, I deleted the 'EmailTemplateList_columns' tags and still had the same issue.

I also get the same expression returned when querying the email_message_view.

Any other ideas I can try? Thanks!

- Bruce

 *** If a forum post solves your problem, please flag it as a solution. If you like an article or forum post, vote it up. ***

The Gaffer's picture

The List E-mail Templates page is very simple. All it does is load the EmailMessageLimited query into a ListDataSet and then display the output in a WebGrid. It should be fairly simple to track down where it is failing. Can you remove the read-only attribute from the EmailTemplateList.ascx file in the templates folder and then edit the LoadDataSources subroutine as follows:

Public Overrides Sub LoadDataSources()
    'DataStore("Templates") = New ListDataSet("EmailMessageLimited")
    DataStore("Templates") = New ListDataSet("SELECT email_message_id, email_message_name, email_message_comment, email_message_status, email_message_type, email_message_is_html  FROM email_message_view")
    ' Restore column definition if stored in worker's tag collection
    if CurrentWorker.Tags("EmailTemplateList_columns") = string.empty then
        CurrentWorker.Tags("EmailTemplateList_columns") = wgTemplates.GetColumnDefinition()
    end if


End Sub

I have commented out the original definition of the Templates datastore and defined it instead with the query from the query table. It also outputs the number of rows loaded into the dataset by the query in the upper corner of the screen.

Let me know if this helps.

John Doyle

matzebru's picture

That worked great John! I wonder why it doesn't pick up the "EmailMessageLimited" but works fine with the query expression.

As long as it works is the name of the game for now. Thanks!

- Bruce

 *** If a forum post solves your problem, please flag it as a solution. If you like an article or forum post, vote it up. ***

The Gaffer's picture

I am sure I have seen this happen in the past, but I don't deal with Helpdesk issues that frequently anymore, so I am at a loss to explain why it is failing to load the query. You could check the query table to be sure that there are no duplicate records or a record which shares the same id as the EmailMessageLimited row.

In any case, I'm glad that this workaround has resolved the problem. You can of course remove the line:


which was only there to assist in debugging the issue.