I’m having trouble with a simple structure field (basic comment-function for a blog). The problem is, that the yaml()-method outputs OK, but the toStructure()-method outputs “0”.
The content-text-file contains this:
---- Comments: - comment: asdf author: - firstname.lastname@example.org date: 2019-01-29 14:50 ----
When I dump it as YAML:
<?php dump($page->comments()->yaml()) ?>
The result looks good:
Array (  => Array ( [comment] => asdf [author] => Array (  => email@example.com ) [date] => 2019-01-29 14:50 ) )
When I use the toStructure()-method:
<?php dump($page->comments()->toStructure()) ?>
The output is:
Kirby\Cms\Structure Object (  => 0 )
What am I missing?