[MGNLSITE-88] Values of YAML page def prototype not available in page definition Created: 09/Mar/18  Updated: 25/Mar/22

Status: Open
Project: Magnolia Site Module
Component/s: None
Affects Version/s: 1.2
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Will Scheidegger Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: inheritance, prototype, yaml
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

demoauthor.magnolia-cms.com


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

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.


Generated at Mon Feb 12 07:12:36 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.