U4-1473 - Doctype templates are named wrongly on creation or render (MVC)

Created by Michael Wulff Nielsen 15 Jan 2013, 10:18:33 Updated by Asbjørn Riis-Knudsen 15 Jan 2013, 11:13:16

Duplicates: U4-1170

To reproduce:

  1. Configure Umbraco to use MVC.
  2. Create a doctype with a '_' char in the name and check "create matching template". I used Page_1col for my example.
  3. Edit the template and enter any text.
  4. Create a page and publish
  5. Point browser to page and notice that only a blank response is returned.

The Umbraco log states the following:

2013-01-15 11:11:49,617 [23] WARN Umbraco.Web.Mvc.RenderMvcController - [Thread 6] No physical template file was found for template Page1col

For some reason Umbraco created the template "Page_1col.cshtml" correctly but tries to render the template without the '_' char. If you rename the template to "Page1col.cshtml" then everything works as expected.

I see two possible solutions:

  1. Have Umbraco create the template with a name that matches what RenderMvcController expects, ie. remove all '_' chars and other illegal chars.

  2. Have RenderMvcController use the correct filename on render. As far as I know the _ is not an illegal char in a view name in mvc.

I suspect that this bug has been there since the first Mvc release in 4.10.0 but I have not verified this.

Comments

Asbjørn Riis-Knudsen 15 Jan 2013, 11:11:14

I can confirm that it has, I filed U4-1170 at the time. This is a duplicate (or the other way round).


Priority: Normal

Type: Bug

State: Duplicate

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 4.11.3

Due in version:

Sprint:

Story Points:

Cycle: