getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.31k stars 168 forks source link

Link to an internal page dosen't render the link #6214

Closed jp-clerc closed 9 months ago

jp-clerc commented 9 months ago

Description

The link to a page with the writer field (or text block) dosen't give the proper link but something like https://site.com/@/page/VZlscZfc8c5gEiwM

Expected behavior
Links to the internal page.

Screenshots
image

Then: image

To reproduce

  1. Insert a writer field in .yml template with the link option available.
  2. Then write some text
  3. Link to an internal page

This bug even exist in the Kirby Demo Page, when you try to insert a link to an internal page (i. e. an article in the blog).

Your setup

Kirby Version 4.0.3

Your system

distantnative commented 9 months ago

This is expected. The writer field inserts permalinks as the content is stored as HTML. That way if a page gets moved, the reference is still working. If your prefer your frontend to render normal URLs instead of permalinks, please use https://getkirby.com/docs/reference/templates/field-methods/permalinks-to-urls on your writer field in your template.

jp-clerc commented 9 months ago

Oh ok ! Sorry for that.

verstecken commented 9 months ago

I was about to complain the same :) Good to know this is expected. But when I click, I get: "Not Found - The requested URL was not found on this server." In my case, it is a PDF I uploaded to the page and tried to link to. Should the /@/file/xyz link open the file correctly? It doesn´t work with internal links neither.

Kirby 4.1.0 / PHP 8.1.27