YAML syntax for After in documentation

49 views
Skip to first unread message

Fred Condo

unread,
Dec 19, 2013, 1:10:18 PM12/19/13
to silverst...@googlegroups.com
It looks like there is a mistake in the documentation for Before/After in YAML configuration files in http://doc.silverstripe.org/framework/en/topics/configuration

Because it is in an example, I see the same error in modules in the wild.

One of the examples has:

After: 'framework/routes#rootroutes', 'framework/routes#coreroutes’

This throws a syntax error in every YAML processor I’ve tried. Should it not be one of the following?

After: ['framework/routes#rootroutes', 'framework/routes#coreroutes’]

or

After:
  - 'framework/routes#rootroutes’
  - 'framework/routes#coreroutes’

I’m posting here to make sure I’m not missing something obvious before generating a PR. Thanks!

c...@silverstripe.com

unread,
Dec 19, 2013, 2:49:00 PM12/19/13
to silverst...@googlegroups.com
Have you got an example yml config file I could use to try and replicate the issue?

As far as I know "After: 'framework/routes#rootroutes', 'framework/routes#coreroutes’ "  is correct.

Could be worth checking to ensure you are using spaces in yml rather than tabs?


C

Fred Condo

unread,
Dec 19, 2013, 3:03:15 PM12/19/13
to c...@silverstripe.com, silverst...@googlegroups.com
Cam,

https://gist.github.com/oddnoc/8045239 or the sample embedded in the documentation.

This fails the syntax checker in NetBeans, as well as this one: http://yamllint.com

Please let me know if you have any questions. Thanks!
> --
> You received this message because you are subscribed to the Google
> Groups "SilverStripe Core Development" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to silverstripe-d...@googlegroups.com.
> To post to this group, send email to silverst...@googlegroups.com.
> Visit this group at http://groups.google.com/group/silverstripe-dev.
> For more options, visit https://groups.google.com/groups/opt_out.
>

c...@silverstripe.com

unread,
Dec 19, 2013, 4:43:54 PM12/19/13
to silverst...@googlegroups.com, c...@silverstripe.com
Fred, you are correct sir!

Checked with a few dev internally here at SilverStripe, agreed that it was incorrect and an update to the documentation has been made. 


Should show up on the docs site on the next update (the docs site pulls markdown from the framework docs folder).


Thanks and Merry Xmas!
Reply all
Reply to author
Forward
0 new messages