WithCandour / statamic-aardvark-seo

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

Fix locale og tag #103

Closed jbreuer95 closed 2 years ago

jbreuer95 commented 2 years ago

We dont use antlers directly but when we call the Tag with

     $html = (new AardvarkSeoTags())->setContext($page)->setParameters([])->head();

Everything seems te load except the locale tag. This seems to fix the problem. Not sure if this happens when you use the tag the normal way.

AndrewHaine commented 2 years ago

Hi @jbreuer95 ,

Thank you, this looks good to me :)

Thanks, andrew

AndrewHaine commented 2 years ago

@jbreuer95 I've unfortunately had to revert this change in 2.0.18 due to some performance issues it was causing on one of our sites (with 20+ languages), I think it's an upstream issue with the {{ locales }} tag needing some optimization. In the meantime I wonder if the site key is missing from the context that you're passing into the tag in the code above - it might be worth adding it manually using Site::current()?

Thanks, Andrew