cbtr
December 6, 2019, 5:09am
1
Hi,
After I recently updated Kirby from 3.2.5 to 3.3.1, all my translated page shows me the error page.
The site seems to not understand that there is two languages. Even my HTML lang attribute doesn’t update. Default language of the website content is set to be in French, translated content would be in English. The fr.php and en.php in site/languages
fr.php:
<?php
return [
'code' => 'fr',
'default' => true,
'direction' => 'ltr',
'locale' => 'fr_FR',
'name' => 'Français',
'url' => '/',
'translations' => [
'selected' => 'Sélection',
'archives' => 'Archives',
'title' => 'Titre',
'year' => 'Année',
'type' => 'Type',
'location' => 'Lieu',
'readmore' => 'Lire la suite',
'readless' => 'Masquer',
'all' => 'Tout'
]
];
en.php:
<?php
return [
'code' => 'en',
'default' => false,
'direction' => 'ltr',
'locale' => 'en_US',
'name' => 'English',
'url' => 'en',
'translations' => [
'selected' => 'Selected',
'archives' => 'Archives',
'title' => 'Title',
'year' => 'Year',
'type' => 'Type',
'location' => 'Location',
'readmore' => 'Read more',
'readless' => 'Less',
'all' => 'All'
]
];
Is there a new way of setting the language after the updates?
Thank you.
cbtr:
‘url’ => ‘en’,
I think there’s a slash missing
'url' => '/en',
cbtr
December 6, 2019, 8:10am
3
I tried with that syntax but still return me the error page. By completely ignore the ‘url’ parameters it works, but then default language shows ‘/fr/’ in the URL, which I would preferably don’t have.
Do you use any routes in your config or in a plugin? Have you cleared the cache after updating?
cbtr
December 6, 2019, 8:33am
5
I don’t think I’m using route, here is copy of the current config.php:
<?php
return [
'languages' => true,
'debug' => true,
'thumbs' => [
'srcsets' => [
'default' => [864, 1200, 1408],
'cover' => [864, 1200, 1408, 2048]
],
'presets' => [
'blurred' => ['width' => 80, 'quality' => 100, 'blur' => true]
]
]
];
No plugin in use. I emptied the cache folder and also browser cache…
Can I have a look at the site online?
cbtr
December 6, 2019, 8:52am
7
The online version has reversed to the 3.2.5 in the meantime I can give access to the 3.3.1 version in a subfolder?
cbtr
December 6, 2019, 9:25am
9
It’s solved… I think I just forgot to hard refresh after remove the cache folder and change the of:
'url' => '/en'
, feel really dumb. So I guess this was the fix and of course clearing the whole cache…
texnixe
December 6, 2019, 9:30am
10
cbtr:
feel really dumb
No need to. Glad it was easy to solve after all.
cbtr
December 6, 2019, 9:33am
11
Thank you! Just bought a license with your link, small token of my appreciation.
1 Like
cbtr
December 6, 2019, 9:43am
12
It’s odd, I just moved the whole directory to a subfolder, the error shows up again, thought, no files has changed?
texnixe
December 6, 2019, 9:49am
13
But subpages in the default language work?
cbtr
December 6, 2019, 9:50am
14
Yes, it really odd, I wonder if it’s because of the .htaccess, because by changing the root folder back to where I uploaded the website it works but then when I move it to another subfolder it doesn’t work anymore.
texnixe
December 6, 2019, 9:53am
15
Does the domain point to that subfolder?
texnixe
December 6, 2019, 9:56am
17
If you put Kirby into a subfolder, you might have to change the .htacess
RewriteBase.
cbtr
December 6, 2019, 9:58am
18
I see, that would make sense, but it’s related to the update? Because prior to that there was no problem with using subfolder.
texnixe
December 6, 2019, 10:07am
19
Hm, I don’t really know, because I don’t recall all the changes that occurred between 3.2.5 and 3.3.1.
As regards the subfolder: So you want to actually run a Kirby version in a subfolder, so that the URL is http://yourdomain.com/kirbysubfolder
?
cbtr
December 6, 2019, 10:11am
20
Yes at the moment the website would be in that subfolder. I have edited the RewriteBase /kirbysubfolder
but still the translation are broken.