-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[V4] UUID permalinks still redirect to default language page #6865
Comments
@dviate Please share your languages setup/config as well. |
NL, in my test setup the main language: <?php
return [
'code' => 'nl',
'default' => true,
'direction' => 'ltr',
'locale' => 'nl_NL',
'name' => 'Nederlands',
'url' => '/',
'translations' => [
*etc* ES, one of the test languages: <?php
return [
'code' => 'es',
'default' => false,
'direction' => 'ltr',
'locale' => 'es_ES',
'name' => 'Español',
'url' => '/es',
'translations' => [
*etc* and just to make sure, also EN: <?php
return [
'code' => 'en',
'default' => false,
'direction' => 'ltr',
'locale' => 'en_US',
'name' => 'English',
'url' => '/en',
'translations' => [
*etc* |
I'm having that problem as well. Want to share an easy workaround by adding a route to config.php [
'pattern' => '/de/@/page/(:all)',
'action' => function ($uuid) {
return go('page://' . $uuid);
}
] That maybe won't cover all cases but helped me for now. |
This looks interesting as a temporary fix, @hansipete! This snippet is only meant to be used once, for the default language, in your case |
Sorry, I never answered this one: Yes – in my case the default language is I found that the language code is added to the link from the Writer Link Dialog:
The produced links will only work when the language url is identical to the language code? |
Same here!
Currently I'm only seeing the issue with the Writer field (but that might be anecdotical). |
Since #5551 got closed and it's still not functioning as desired, here's a follow-up for this issue, which is bugging me in Kirby 4.5.0.
I was just playing around with this new feature, but apparently it doesn't work as expected as it brings the visitor to a 404 page. When I'm adding a link to another page, no matter in which language for a page I'm working, the current language is added to the
a
.So, for instance, when I'm working in NL the HTML based on a UUID looks like
<a href="/nl/@/page/HlyrsG30ZVPXPd9F">hallo</a>
and when I'm working on a Spanish translation, it addses
to the URL so that it looks like<a href="/es/@/page/HlyrsG30ZVPXPd9F">hola</a>
. The weird thing is, it works well in the non default language, but a UUID-based link that also contains the default language prefix, leads to a 404.This HTML can also be found in the accompanying
.txt
file in thecontent
folder; it appears that the link creator in the panel adds the country prefix to the URL which results in errors, since a link without a language prefix, like<a href="/@/page/HlyrsG30ZVPXPd9F">hello</a>
works fine.Not adding the language prefix via the panel when a user is editing something in the default language should do the trick here?
The text was updated successfully, but these errors were encountered: