Kirby 3: output after return (route actions)

I’ve been exploring Kirby 3 and I think I’ve found a bug – I’ve followed a tutorial for a site map and it kept displaying it in html, even though I followed all the instructions and just copied everything 1:1 as in website

The solution I found was to add
<?die;?>

in the end of /site/snippets/sitemap.php
Hopefully it’ll be helpful for others

Cheers

Have you tried: return new Response($mySitemap, 'text/xml'); in the controller instead?

1 Like

I did work like a charm. Thank you!