Hi Kirbymunnity,
I stumble upon a strange issue this morning while developing with Kirby 2.4.1. It is quite simple : I can’t select the site Logo for the default language. Let me explain with my setup :
c::set('languages', array( // LANGS ARRAY
array(
'code' => 'fr',
'name' => 'Français',
'locale' => 'fr_FR',
'url' => '/fr',
),
array(
'code' => 'en',
'name' => 'English',
'default' => true,
'locale' => 'en_US',
'url' => '/en',
),));
My default language is set on English. I didn’t change my site.yml blueprint :
logo:
label: Logo
type: image
width: 1/2
So when I select my logo (here .svg but also tested with .png) it works with any language, except for the default one as you can see below (EN as default) when I save the page.
It gets weirder when I check the site.en.yml
with the last line : Logo: logo.svg
.
I tried to play with translate: false
but it gets worth as all languages are using the wrong default logo
I tried to switch the default language to FR : logo.svg on English page works but no longer the FR one. The issue is real when the default language is selected on the live website :
Whoops \ Exception \ ErrorException (E_ERROR)
Call to a member function url() on a non-object
for this simple line :
<img src="<?= $site->logo()->toFile()->url() ?>" alt="<?= $site->logo()->name() ?>" />
Anyone already experienced this issue ?
Thank you for your help guys,
Happy coding.