[DOCU-928] Tip for developers that YAML include files should not have spaces at the front of the line Created: 24/Jan/17  Updated: 27/May/20  Resolved: 27/May/20

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: 5.6, 5.7, 6.1, 6.2
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Ashraf Khamis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: Pre-2019 mgnl-staff requests
Sprint: Docu Sprint 79
Story Points: 0.5

 Description   

A common pitfall for YAML include files is that they do not work because the lines have too many spaces in front of the first line.
This is a micro "perfect storm"

1. Developers are not used to indentation being so important.
2. If you copy some lines out of an existing YAML defintion into a new file - unless you take care of it you will have some spaces (indentation) at the beginning of the lines.

Therefore please provide a tip of some kind that the first line in an include file should not have any indentation. Or a note that this could be the problem if their include file is not working.

 

On this page:

https://documentation.magnolia-cms.com/display/DOCS61/YAML



 Comments   
Comment by Christopher Zimmermann [ 26/Sep/19 ]

Still relevant.

Comment by Ashraf Khamis [ 27/May/20 ]

The YAML include sections at https://documentation.magnolia-cms.com/display/DOCS62/YAML and https://documentation.magnolia-cms.com/display/DOCS62/YAML+inherit+and+include updated with the following tip:

If your !include file is not working, check that the first line in the included YAML file does not have any indentation.

Reviewed by Topher. All changes backported to DOCS61, DOCS57 & DOCS56.

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