Anchor link on multi languages page

I have a small issue with anchor links on a multilang site. This is my content on a German page:

(link: #technologies text: text title: titel)

The frontend output is like this:

<a href="http://localhost/test/de/technologies" title="titel">text</a>

I expected it to be this:

<a href="http://localhost/test/de#technologies" title="titel">text</a>

What am I doing wrong? Thanks in advance!

I just tried to reproduce this but my output looks like this:

<a href="#technologies" title="titel">text</a>

There recently were some issues with certain plugins and multilanguage, maybe you can isolate it by disabling the plugins?

Thank you for the quick answer. I only use one plugin (uniform) and disabling it doesn’t change anything.

I should’ve said, that I setup a one pager, where every section is a single page in Kirby. I found, that when I set the Technologies page to the status Draft, the generated link becomes <a href="/de#technologies"> (which then doesn’t work because the section isn’t there anymore, because it’s now a draft). When I publish it again, it becomes <a href="/de/technologies"> again (which doesn’t work either, because it’s not the anchor I want).

I really don’t get what’s happening here :sweat_smile:

Do you use some kind of Page Model overwriting the url() method of the sections?

No. The sections get loaded by the template dynamically like this:

foreach($pages->published() as $section) {
  snippet($section->uid(), array('data' => $section));

I have a snippet for each section.

Maybe it’s related to Kirbys .htaccess config? But that wouldn’t explain the wrong links that are generated. I will make a few tests.

That looks fine. It should not affect the links at all.

Please make sure to look at the actual source code. The link displayed in the browser status bar will differ.

Good point. Thank you anyway! I will come back when I find something.