Bug with External Language URL?

Hey all,

Have a little trouble using external URLs relating to translations (Multi-language | Kirby CMS); when the site gets redirected to a language specific URL, the default fallback template of the page is shown instead. Has anyone encountered this problem before or has any insight into it?

Language specific code (ca.php):

return [
'code' => 'ca',
'default' => false,
'direction' => 'ltr',
'locale' => [
    'ca'
],
'name' => 'Canada',
'translations' => [
    'people' => 'Canadians'
],
// 'url' => NULL
'url' => 'https://example.ca/'
];

config.php and config.domain.php:

return [
    'home' => 'bonuses',
    'debug' => true,
    'languages' => true,
    'languages.detect' => false,
    // 'cache' => [
    //     'pages' => [
    //         'active' => true,
    //         'ignore' => function ($page) {
    //           return $page->title()->value() === 'Do not cache me';
    //         }
    //     ]
    // ]
];

Do all your pages have text files with the language extension, e.g. project.de.txt etc.? Make sure there are no text files without that language code.

Does this only happen with language specifc URL? Or even if you don’t use URLs per language?

What Kirby 3 release are you running? The latest version?

  1. All pages do not have a .txt file with the language extension. Is that required for the language external URL to work?

  2. This only happens with the custom language URL and only on 1 or 2 pages. If I set the external language URL back to NULL, everything works as intended.

  3. Yes, just updated the core Kirby folder today to see if it would fix the issue.

Would having separate config files (one for local and one for main domain) interfere with the external language URL functionality?

All txt files must have the language extension, yes, otherwise Kirby does not work as expected.

Sorry misinterpreted your question, all the content files do have a language extension.

The problem with the translations only occurs when an external URL is set for the language. If the I set the URL to NULL it works as intended. Any idea what could cause this?

If it only happens on 1 or 2 pages, then there is maybe something wrong with these pages. Although it’s a bit weird if it doesn’t happen with a setup without custom domain. Nevertheless, if all other pages work, then I’d first have a deeper look what might be wrong with these pages.

I have inspected the templates as well, but the problem doesn’t seem to be there as other pages with the same template are being translated.

I’m running out of ideas and this is probably one of these things that are hard to tell without actually inspecting the project.

Do you have any custom routes set up in config or a plugin?

Maybe also try to recreate those pages, maybe something is corrupted.