vendor/withcandour/aardvark-seo/src/Http/Controllers/Web/SitemapController.php
In the above controller there are a few lines using abort(404) to throw the 404 page.
This breaks your site when using blade because this doesn't load in the default variables that Statamic loads.
The solution would be to use use Statamic\Exceptions\NotFoundHttpException; and instead of the abort you would throw the NotFoundHttpException like throw new NotFoundHttpException;.
vendor/withcandour/aardvark-seo/src/Http/Controllers/Web/SitemapController.php
In the above controller there are a few lines usingabort(404)
to throw the 404 page. This breaks your site when using blade because this doesn't load in the default variables that Statamic loads. The solution would be to useuse Statamic\Exceptions\NotFoundHttpException;
and instead of the abort you would throw the NotFoundHttpException likethrow new NotFoundHttpException;
.