I've used the configuration -> template feature to override TemplateUserConfirmEmail but I'm getting 500 error.
It's working fine if I create the template (TemplateUserConfirmEmail.cshtml) in the theme.
We are using RC1 and tried to debug the issue but didn't get anywhere. It worked fine before RC1.
here is the stack trace:
RuntimeBinderException: Cannot perform runtime binding on a null reference
CallSite.Target(Closure , CallSite , object )
System.Dynamic.UpdateDelegates.UpdateAndExecute1<T0, TRet>(CallSite site, T0 arg0)
CallSite.Target(Closure , CallSite , object )
OrchardCore.DisplayManagement.Theming.ThemeLayout.ExecuteAsync() in ThemeLayout.cs
+
ThemeLayout.Content.Add(body);
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
OrchardCore.DisplayManagement.Liquid.LiquidViewTemplateExtensions.RenderAsync(LiquidViewTemplate template, LiquidOptions options, IServiceProvider services, TextEncoder encoder, TemplateContext templateContext) in LiquidViewTemplate.cs
+
await viewContext.View.RenderAsync(viewContext);
OrchardCore.Liquid.Services.LiquidTemplateManager.RenderAsync(string source, TextEncoder encoder, TemplateContext context) in LiquidTemplateManager.cs
+
return await result.RenderAsync(_liquidOptions, _serviceProvider, encoder, context);
OrchardCore.Templates.Services.TemplatesShapeBindingResolver+<>c__DisplayClass7_0+<<BuildShapeBinding>b__0>d.MoveNext() in TemplatesShapeBindingResolver.cs
+
var htmlContent = await _liquidTemplateManager.RenderAsync(template.Content, HtmlEncoder.Default, context);
OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ProcessAsync(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in DefaultHtmlDisplay.cs
+
return CoerceHtmlString(await shapeBinding.BindingAsync(context));
OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs
+
shape.Metadata.ChildContent = await ProcessAsync(actualBinding, shape, localContext);
OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay.ExecuteAsync(DisplayContext context) in DefaultHtmlDisplay.cs
+
}
OrchardCore.Users.Controllers.BaseEmailController.SendEmailAsync(string email, string subject, IShape model) in BaseEmailController.cs
+
var htmlContent = await _displayHelper.ShapeExecuteAsync(model);
OrchardCore.Users.Controllers.RegistrationController.SendEmailConfirmationTokenAsync(User user) in RegistrationController.cs
+
await SendEmailAsync(user.Email, T["Confirm your account"], new ConfirmEmailViewModel() { User = user, ConfirmEmailUrl = callbackUrl });
OrchardCore.Users.Controllers.RegistrationController.SendVerificationEmail(string id) in RegistrationController.cs
+
await SendEmailConfirmationTokenAsync(user);
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor+TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object[] arguments)
System.Threading.Tasks.ValueTask<TResult>.get_Result()
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask<IActionResult> actionResultValueTask)
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
OrchardCore.Diagnostics.DiagnosticsStartupFilter+<>c__DisplayClass3_0+<<Configure>b__1>d.MoveNext() in DiagnosticsStartupFilter.cs
+
await next();
Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext) in ModularTenantRouterMiddleware.cs
+
await shellContext.Pipeline.Invoke(httpContext);
OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func<ShellScope, Task> execute) in ShellScope.cs
+
await execute(this);
OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext) in ModularTenantContainerMiddleware.cs
+
await shellScope.UsingAsync(scope => _next.Invoke(httpContext));
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
As i remember i think it has been renamed to ConfirmEmail.
@mobinzk do you want to provide a PR that would document these templates? That would help other devs for sure that face the same issue.
@jtkech @sebastienros Thanks for your reply.
I've try to create a Template in the orchard Admin and name it as ConfirmEmail but when I re-send the confirm email to the user I get the original reset email we've here.
I think I didn't explain the issue correctly, so I've created a video to demonstrate the issue for you so I can explain myself better.

Okay sorry TemplateUserConfirmEmail is still used indirectly, i could repro, i'm working on it
Update: Fixed in #4804