Refactoring: Fixed spelling mistake in method name (#20460)

* Fixed spelling mistake in method name.

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Andy Butland
2025-10-10 15:00:47 +02:00
committed by GitHub
parent fd34ce5bd7
commit 3df8b9e41a
2 changed files with 10 additions and 3 deletions

View File

@@ -112,7 +112,7 @@ public class RenderController : UmbracoPageController, IRenderController
/// </remarks>
protected override IActionResult CurrentTemplate<T>(T model)
{
if (EnsurePhsyicalViewExists(UmbracoRouteValues.TemplateName) == false)
if (EnsurePhysicalViewExists(UmbracoRouteValues.TemplateName) == false)
{
// no physical template file was found
return new PublishedContentNotFoundResult(UmbracoContext);

View File

@@ -79,7 +79,7 @@ public abstract class UmbracoPageController : UmbracoController
/// </exception>
protected virtual IActionResult CurrentTemplate<T>(T model)
{
if (EnsurePhsyicalViewExists(UmbracoRouteValues.TemplateName) == false)
if (EnsurePhysicalViewExists(UmbracoRouteValues.TemplateName) == false)
{
throw new InvalidOperationException("No physical template file was found for template " +
UmbracoRouteValues.TemplateName);
@@ -92,7 +92,14 @@ public abstract class UmbracoPageController : UmbracoController
/// Ensures that a physical view file exists on disk.
/// </summary>
/// <param name="template">The view name.</param>
protected bool EnsurePhsyicalViewExists(string? template)
[Obsolete("Please use the correctly spelt EnsurePhysicalViewExists method. Scheduled for removal in Umbraco 18.")]
protected bool EnsurePhsyicalViewExists(string? template) => EnsurePhysicalViewExists(template);
/// <summary>
/// Ensures that a physical view file exists on disk.
/// </summary>
/// <param name="template">The view name.</param>
protected bool EnsurePhysicalViewExists(string? template)
{
if (string.IsNullOrWhiteSpace(template))
{