Developer forum

Forum » Templates » SeheduledTaskErrorEmail template

SeheduledTaskErrorEmail template

Tomislav Bušić
Reply

Hello everyone, I would appreciate if someone has an idea or solution. 

There seems to be an issue with the email template that I receive when the scheduled task is executed.

(rapido -> /Templates/DataIntegration/Notifications )

Thank you in advance.

Best regards

Tomislav

 

errortemplate.png

Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

There is an error in line 4449 and 4460 that needs fixing.

Or you can use this one:

@inherits RazorTemplateBase<RazorTemplateModel<Template>>
@using Dynamicweb.Rendering
@MasterPageFile("/Files/Templates/Designs/Rapido/EmailMaster.cshtml")
@Include("/Files/Templates/Designs/Rapido/EmailHelpers.cshtml")
@Include("NotificationsEmailHelpers.cshtml")

<table bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="0" id="emailBody">
    @RenderMessage()
    @RenderTemplateTagsValues(GetTableStyle(), GetHeaderStyle(), GetCellStyle())
</table>

@helper RenderMessage()
{
    Column message = new Column();
    message.header = "Here are the errors occurred in the Live Integration Add-In named: <strong>" + GetValue("Ecom:LiveIntegration.AddInName") + "</strong>";
    @CreateRow(message);

    <table style="@GetTableStyle()">
        @RenderHeading("Core Information")
        @RenderKeyValueRowLog("Log Information", GetString("Ecom:LiveIntegration.ErrorMessage"), GetCellStyle())
        @RenderKeyValueRow("Host (Scheme and Authority)", GetCurrentUrl(true), GetCellStyle())
        @RenderKeyValueRow("Machine name", System.Environment.MachineName, GetCellStyle())
    </table>
}
Votes for this answer: 1
 
Tomislav Bušić
Reply

Thank you, Nicolai.

Unfortunately, it's still not working.

We've modified the Scheduled Task, but only the line

"@RenderTemplateTagsValues(GetTableStyle(), GetHeaderStyle(), GetCellStyle())"

remains.

I'm not sure if I should remove it as well or not?

The image with the changes is in the description. Thank you in advance.

errortem.png forumtemplate.png
 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

The code relies on includes and helpers I cannot see, so it requires access to the entire codebase.

But remove what is not working - try adding a @TemplateTags() to the template and then you get all information available.

Votes for this answer: 1
 
Tomislav Bušić
Reply

Thanks Nicolai,

I removed the whole line of code

@RenderKeyValueRow("Host (Scheme and Authority)", GetCurrentUrl(true), GetCellStyle())

 and now it works somewhat.

BR

Tomislav

 

You must be logged in to post in the forum