[MAGNOLIA-7262] TemplateDefinitionValidator produces false positives Created: 14/Feb/18  Updated: 02/Mar/18  Resolved: 28/Feb/18

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.6.2
Fix Version/s: 5.6.3

Type: Bug Priority: Neutral
Reporter: Roman Kovařík Assignee: Evzen Fochr
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2018-02-14 at 09.12.30.png     PNG File Screen Shot 2018-02-14 at 10.19.26.png    
Issue Links:
causality
caused by MAGNOLIA-7217 Report any definitions that reference... Closed
relation
is related to MGNLCE-132 Solve definition problems in servlet ... Closed
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
Epic Link: YAML backwards compatibility
Sprint: Kromeriz 136
Story Points: 1

 Description   

TemplateDefinitionValidator produces false positives for missing template scripts:

  • file system templates (outside of resource.dir, see templating-samples module)
    • JspRenderes uses info.magnolia.context.WebContext#include so the template is not fetched from the resource origin
  • blossom templates (see blossom samples module)
    • The actual blossom template script will be the one returned by the controller

P.S
Please unignore DefinitionAppUITests when this issue is fixed. (Both CE and EE)



 Comments   
Comment by Roman Kovařík [ 14/Feb/18 ]

[10:24 AM] Ilgün Ilgün:

    // If the templateScript is null the area is rendered simply by looping the components, to prevent this we
    // need to set it to something. The actual template script used later when rendering will be the one returned
    // by the controller
    definition.setTemplateScript("<area-script-placeholder>");

[10:25 AM] Ilgün Ilgün: @Roman I believe for that we have to check in the validators whether the renderType is NOT blossom

Comment by Roman Kovařík [ 22/Feb/18 ]

Looks like we should check the template script only if renderType = freemarker. It's probably the only one getting the script from the resource origin.

Generated at Mon Feb 12 04:22:13 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.