Last week I updated a kirby site from 3.3.3 to 3.4.3 and now my content representation doesn’t work anymore. the url …/events.json leads me now to a 404. but with kirby 3.3.3 it worked perfect.
I’ve tested a few different kirby versions and it breaks with version 3.3.5.
I couldn’t find any hint, of a breaking change. Does anybody else experienced this as well?
the events.json.php
looks like this:
<?php
$data = [];
foreach($pages->children()->listed()->sortBy('date', 'asc') as $event) {
$data[] = [
'url' => $event->url(),
'title' => $event->title()->value(),
'date' => $event->date()->toDate('%Y-%m-%d') . 'T' . $event->time()->toDate('%H:%M')
];
}
echo json_encode($data);