WithCandour / statamic-aardvark-seo

Candour's SEO addon for Statamic
https://statamic.com/marketplace/addons/aardvark-seo
12 stars 18 forks source link

Sitemap Controller throwing faulty 404's #154

Closed kevinmeijer97 closed 1 year ago

kevinmeijer97 commented 1 year ago

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;.

Screenshot 2023-01-31 at 16 56 51
ols-bradshaw commented 1 year ago

Hi there. Thank you for flagging this.

The fix for this will be included in the upcoming 2.0.31 release