-
Bug
-
Resolution: Unresolved
-
Major
-
6.2, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.2.5, 6.2.6, 6.2.7, 6.2.8, 6.2.9
-
None
Base Problem:
Our OTB Site’s templateAvailability is not applicable in a real project, as its not reacting to any hierarchy AND its is not YAML based: For example a 'home-template' can be added anywhere.
Therefore a real project has to implement its own custom Site’s templateAvailability. As I had to do for the author training (and also fullstack-training):
For teaching proper multisite behavior => capability to manage properly where what page-template can be added (home templates only at top etc)
See the attached custom implementation 'HierarchicalConfiguredSiteTemplateAvailability'.
Specific problem
In the new UI framework, one can not differentiate between the Action/Situation of:
- "Add Page" => a new temp Page-Node is created before persistance
- "Change Template" => an existing page changes the template
In both cases the system checks the Site’s templateAvailability.
In the old UI framework, the pages App used the class info.magnolia.pages.app.PagesContentApp.
Where the “PagesContentApp” class passed the tempNode (line 121) , the NEW node to create.
Now the pages app uses the default class info.magnolia.ui.framework.app.BaseApp. Which does: On “Add Page” it passes the existing parent node of the new node! => this is bad!
Reproduce
Use the default OTB Site’s templateAvailability and one can see the call
For reproduction in real multisite environment, use the attached Java class 'HierarchicalConfiguredSiteTemplateAvailability' and create this configuration:
https://wiki.magnolia-cms.com/display/FullStackTraining62/%5BExercise%5D+Use+Custom+YAML+based+TemplatesAvailability