enonic / xp-apps

Enonic XP bundled applications.
GNU General Public License v3.0
1 stars 3 forks source link

Error when trying to save as page template from a non-site content #453

Closed sgauruseu closed 6 years ago

sgauruseu commented 6 years ago
  1. Click on the Features and select Checkbox content, for example
  2. type a name and select the 'Main Region' in the controller-options
  3. Open the 'Inspection Panel' and press the 'Save as template' button.

Exception occurs: Caused by: com.enonic.xp.content.ContentNotFoundException: Content with path [/features/r3e/_templates] was not found in branch [draft] at com.enonic.xp.core.impl.content.GetContentByPathCommand.execute(GetContentByPathCommand.java:32) at com.enonic.xp.core.impl.content.CreateContentCommand.validateCreatePageTemplate(CreateContentCommand.java:194

checkbox
alansemenov commented 6 years ago

When saving a template, we should first find the closest site of the content and then find its "templates" folder.

If content doesn't have the ancestor site, the "Save as Template" action should be hidden.