Open doldenroller opened 11 months ago
I can't reproduce the issue, because this is not related with UUID. I don't think this is a bug. You entered https://dev-ssl:8890
and this is not valid URL as expected behavior. You can't save that url as custom type either.
The https://dev-ssl:8890
is my testenviroment and I didn't type that in. It was changend to url as soon as I picked a page.
https://github.com/getkirby/kirby/assets/29595303/82789fb9-cd06-4702-aca7-94a273a18ea1
This doesn't happend when UUIDs are enabled.
Because stores as page://uuid
instead absolute url when uuid enabled.
But storing the absolute URL when UUIDs are disabled doesn't really makes sense. If you want to deploy it to a liveserver or change the domainname of the site all links would be broken. It should be stored as relative path of the page.
Basicly it should do the same as the pages-field when UUIDs are disabled.
Funny thing is, that the type changes from Page
to Url
and creates the absolute path of the page that can't be saved. But when I delete the domain and just leave the relative path it can be saved. Even if the type is still Url
. The small red cross indicates that it's not a valid url, but it still can be saved. I guess this is kind of a temporary workaround, but not the real solution.
https://github.com/getkirby/kirby/assets/29595303/1bb6cdec-99e4-4096-a67d-15e9719f6acb
The behavior to store absolute URLs was introduced in https://github.com/getkirby/kirby/pull/5547. I agree it would be more robust to store paths instead, maybe with leading slash (like /path/to/page
). With a <base>
tag these URLs would then also work in subfolder setups.
I just came across this bug in a project.
Because the link field is also used in Writer and Textarea fields, my editors were creating absolute links everywhere 🤦♂️ After moving to the live environment, I had to update all of the URLs to make them work.
Why disable UUIDs in the first place? It seemed to be a good workaround for the duplicate issue https://github.com/getkirby/kirby/issues/4867.
The UI for inserting links is simply not working as expected when UUIDs are disabled:
Talking about the usage in Writer and Textarea fields:
I'd expect a (link: )
tag with the slug just like the example in the docs.
Description
The Linkfield try to save the URL of a page when UUIDs are disabled. In a development enviroment the field connot be saved, because the local URL is considered not valid by the System.
Expected behavior
The Page ID should be saved.
Screenshots
To reproduce
Your setup
Kirby Version
4.0.1
Your system (please complete the following information)
Additional context