Multi-language setup not using content from any other than the default language

I have a localhost dev copy of a Kirby site. I added a second language via the panel. Switching languages in the frontend and in the backend works.

But I have a very strange problem: Content for the second language, added in any field (except one), is stored in the content file but is neither shown in the panel nor in the frontend.

This means: In the panel, I input content for the second language “de” and save. As a result, this content shows up in the respective content file “default.de.txt”, just as expected. But if I reload the panel, the content of the default language is displayed, although second-language-specific content is still present in the content file.

The same is true in the frontend: Content from the respective “default.de.txt” file is ignored when opening the second language version of a page.

There is only one exception: I can change the slug field for the second language of a page. And this change is not only stored in the content file, but also displayed in the panel and used in the frontend.

All caches have been cleared, so it should not be a cache problem. And of course, all the fields I tried are set up as translatable.

Any idea what could cause this issue and how to solve it?

(The code of the Kirby site can be seen here: GitHub - MichaelvanLaar/mvlkss: Michael van Laar’s Kirby Site Starter)

I notice you use a lot of plugins, maybe it’s one of them causing the issue. Since the setup is quite complicated, hard to tell what’s going on at quick glance

OK, I hoped, I could avoid going through all the plugins. But since multiple languages are a must-have in almost all of my upcoming projects, I have no choice. :wink:

Looks like it might just be an issue in the config with the config, when I remove this bit

    "isaactopo.xmlsitemap.ignore" => $kirby
                ->site()
                ->index()
                ->filterBy("seoIndex", "false")
                ->pluck("uri"),

the issue goes away…

Oh wow, thanks for researching! :slight_smile: Yes, obviously it is this configuration line that causes the problem.

Not to mention that my code in that place was pretty much nonsense, even with “proper” code in that place I still have some problems with the XML sitemap plugin. So I’ll probably uninstall it and just write my own template for an XML sitemap page instead. This will then automatically be multilingual. And I can influence exactly what I want to include in the sitemap and what not.

Perfect: My own XML sitemaps work even better than the ones created by the plugin. :slight_smile: Three hours of work, but worth it. Prior to this, using the plugin instead was simply an act of laziness, to be honest.

For a control freak like me having exact control over every line of frontend code should always be top priority. :wink: