statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.05k stars 530 forks source link

Default site variables alias don't work #3313

Closed jimblue closed 3 years ago

jimblue commented 3 years ago

Bug Description

Like the doc explain it, for single sites application with such configuration:

// config/statamic/sites.php

'sites' => [
    'default' => [
        'name' => 'My Statamic Site',
        'locale' => 'en_US',
        'url' => 'http://mysite.com/',
    ]
]

The following variables alias should work:

{{ site:name }}
{{ site:url }}

Which is not the case for me.

Environment

Statamic 3.0.45 Pro Laravel 8.29.0 PHP 8.0.2 4rn0/statamic-v3-image-optimizer 1.0.5 jimblue/htmlmin 1.1.0 jimblue/instagram dev-develop jimblue/mapbox 1.2.0 jimblue/webpacker dev-develop statamic/seo-pro 2.1.3

robdekort commented 3 years ago

That's odd, just tried and it works here, both in multisite and non multisite.

jasonvarga commented 3 years ago

Seems to be fine!

What isn't working? What do those variables output?

jimblue commented 3 years ago

OK I've just found what happened. It's due to a collision with one of my globals that I've smartly named site 💩

Sorry for the noise guys, I close the issue ! 👋