[MAGNOLIA-6908] YAML includes should't be placed inside of dialogs/templates folder Created: 22/Dec/16  Updated: 08/Jun/20  Resolved: 08/Jun/20

Status: Closed
Project: Magnolia
Component/s: resource-loader
Affects Version/s: 5.4.10
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Roman Kovařík Assignee: Unassigned
Resolution: Workaround exists Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File inlcude-exmaple.png    
Issue Links:
causality
is causing MTE-99 linkSwitchableField.yaml is loaded in... 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
Date of First Response:

 Description   

If you place an YAML include file into the dialogs/templates folders, it's loaded into the registry which is not support to be in and might produce false positive errors visible the definitions app.

We should:
A] have a pattern for YAML include files so we can exclude those from the registries
B] document that includes should be placed outside of the dialogs/templates folders. this is also the workaround for this problem.



 Comments   
Comment by Roman Kovařík [ 22/Dec/16 ]

[11:38 AM] Mikaël Geljić: right, @Roman this is how I typically had yaml includes, so that they don't mess with registries
[11:38 AM] Mikaël Geljić:
form:
tabs:
personal: !include /qa_classpath/generic/tabs/personal.yaml
address: !include /qa_classpath/generic/tabs/address.yaml
contactDetails: !include /qa_classpath/generic/tabs/contactDetails.yaml
[11:38 AM] Mikaël Geljić: qa_classpath is the module btw
[11:39 AM] Mikaël Geljić: so, if it's something we can agree upon, then we could document it

Comment by Richard Gange [ 09/Aug/18 ]

If you use .yml instead of .yaml this also works. Dot yml files are treated as plain resources instead of definition resources. However, both are valid yaml extensions so syntax highlighting remain in most editors. 

Comment by Richard Gange [ 08/Jun/20 ]

The workaround is to put the includes directory outside the registry.

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