U4-2276 - IFileService and ITemplate is not complete and doesn't create/update template files properly

Created by Shannon Deminick 28 May 2013, 01:21:01 Updated by Shannon Deminick 09 Jan 2015, 06:47:49

Relates to: U4-2243

Relates to: U4-5171

Relates to: U4-5411

Relates to: U4-2277

Subtask of: U4-5830

The legacy template API had two helper utilities: MasterpageHelper and ViewHelper which were used to create and update template files including the default text that gets displayed as well as other helper utilities for reading these files like determining what content areas are available in the parent view, etc...

The new template (FileService) api does not implement these helper utilities and we end up with empty/blank template files and we do not detect the current template's rendering engine property since we are not using these template helpers.

Currently the IFileService and ITemplate classes don't take care of all of the logic/functionality that the legacy Template class did. We need to update this and write tests for the new API for dealing with templates.


Shannon Deminick 28 May 2013, 01:39:16

Initially to fix issue U4-2243 I started migrating the MasterpageHelper and ViewHelper over to the Core project for the TemplateRepository and Template class to use, however I quickly realized there are other issues such as this one: U4-2277. When saving templates, especially master pages, we need to check template inheritance and update the master page markup accordingly (all of the logic for saving master pages and view pages are in these two helper classes for which the new API doesn't use).

Also, the Umbraco.Core.Models.Template.GetTypeOfRenderingEngine method needs to use the logic found in umbraco.cms.businesslogic.template.DetermineRenderingEngine since it does not currently return the correct rendering engine for new templates.

For the fix for U4-2243 I'm just going to revert the changes to the legacy API.

Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 6.0.0, 6.1.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5

Due in version: 7.3.0


Story Points: