Uploaded image for project: 'Magnolia pages module'
  1. Magnolia pages module
  2. PAGES-481

Uses BaseApp class instead of PagesContentApp: One can not differentiate between "New Page" and "Change Template" anymore -> big problem for TemplatesAvailability

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 6.3.0
    • 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
    • Pages app
    • 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:

      1. "Add Page" => a new temp Page-Node is created before persistance
      2. "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

       

        Acceptance criteria

              Unassigned Unassigned
              cringele Christian Ringele
              AuthorX
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:

                  Bug DoR
                  Task DoD