Uploaded image for project: 'Magnolia Site Module'
  1. Magnolia Site Module
  2. MGNLSITE-88

Values of YAML page def prototype not available in page definition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Neutral Neutral
    • None
    • 1.2
    • None
    • demoauthor.magnolia-cms.com

      When you use a (YAML) page definition prototype referenced in a site definition, (some of?) its values are not available in the page definitions of that site

      Steps to reproduce

      • Go to demoauthor.magnolia-cms.com
      • Navigate to /modules/multisite/config/sites/travel/templates and make sure that the prototypeId property is pointing to travel-demo:pages/prototype
      • Open the prototype in the Web Dev > Resource Files app: The "renderType" is set to "site" here in the prototype
      • Edit the standard.yaml page definition of travel-demo, and remove the "renderType" entry

      Expected behaviour

      Since the renderType is defined in the prototype, this value should be used for all page definitions that don't overwrite it. The same applies to any other definition in the prototype (e.g. "type").

      Experienced behaviour 

      When you open the "/travel/about" page, you will see the following error:

      javax.servlet.ServletException: info.magnolia.rendering.engine.RenderException: No renderType defined for definition [info.magnolia.module.site.templates.PageTemplateDefinition@3a97f6af[id=travel-demo:pages/standard,name=standard,renderType=<null>,description=<null>,title=<null>,templateScript=<null>,autoGeneration=info.magnolia.rendering.template.configured.ConfiguredAutoGeneration@1d733e61[content={},generatorClass=<null>]]] 

       

      When you leave the renderType in the standard.yaml page template definition, but remove the "type", you would expect the type to be set to the value of the prototype. Instead the default type value ("content") is set.

      The behaviour is the same in CE with the site module and in EE Pro with the multisite module.

      Strangely enough, the inheritance from the prototype works for instance for the "templateScript" attribute.

        Acceptance criteria

              Unassigned Unassigned
              will Will Scheidegger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:

                  Bug DoR
                  Task DoD