I’ve had this error show up on my local machine before, but thought it was because of things not being rightly configured so I moved on.
Now moving the (working) site to a different server, I again see that error when I try to log in.
The frontend is working fine and all the language and language switching works as expected.
But as soon as I want to login into the panel, I get this error (after submiting my login data)
Argument 1 passed to Kirby\Toolkit\Str::before() must be of the type string, null given, called in /home/axanader/www/example.com/ docs/kirby/src/Cms/Language.php on line 421
the language files are basic:
# /site/languages/en.php return [ 'code' => 'en', 'direction' => 'ltr', 'locale' => 'en_US', 'name' => 'English', ];
I tried adding more local data, but this had no effect:
return [ 'code' => 'en', 'direction' => 'ltr', 'locale' => [ 'en_US', LC_ALL => 'en_US.utf8', LC_COLLATE => 'en_US.utf8', LC_MONETARY => 'en_US.utf8', LC_NUMERIC => 'en_US.utf8', LC_TIME => 'en_US.utf8', LC_MESSAGES => 'en_US.utf8', LC_CTYPE => 'en_US.utf8' ], 'name' => 'English', ];
I also tried adding
setlocale(LC_ALL, 'en_US.utf-8'); to the main
Bash output for
LANG= LC_CTYPE="C" LC_COLLATE="C" LC_TIME="C" LC_NUMERIC="C" LC_MONETARY="C" LC_MESSAGES="C" LC_ALL=
which I am very much assuming I can not change, as it is a simple webhosting product.
If there is no other (kirby) option, I might ask the server admins to add this, although I hope there is another way?
Any input appreciated, thanks!