Closed JoseMarcenaro closed 1 month ago
Oops - my mistake. The .cshtml for the new template was not a copy of the existing one and was not correct (referenced an invalid Layout) Once fixed the template, the import went fine.
Just to clarify what happened with my "invalid" razor view - in case someone else experiments the same problem.
In Umbraco v14, when saving a Template (Create or Update) the razor view content is parsed to lookup for the Layout assigment, i.e. Layout = null
(default) or Layout = "myDefaultLayout.cshtml";
The Layout found is then set by Umbraco as the "Master Template" for the current one, and the current item is nested under the detected Layout ... that should be recognizable as another Template - in Umbraco v14. This is a new restriction in v14
So the template might be invalid - and unable to save - for several reasons:
Layout = "Layouts/DefaultLayout.cshtml"
bool unsupportedBrowser = ...
Layout = unsupportedBrowser ? "unsupportedBrowserTemplate.cshtml": "defaultTemplate.cshtml";
Of course, this is an Umbraco restriction - not a uSync restriction So when you try to add the "offending" template using uSync, the operation silently fails due to the reasons mentioned.
Describe the bug When adding a config file for a template: the Import action shows "Import" but it does not actually add the Template Both the [Report] button and the actual list of Templates show that it has not been imported.
To Reproduce Steps to reproduce the behavior:
Umbraco.Templates::14.1.2
14.0.1-preview001
Expected behavior The Umbraco Template for the new .config and razor file should have been created
About your Site (please complete the following information):