Different URL-appendix on page creation and "Create from title" button

When I create a page using the Panel, sometimes a character is missing:
2013, année de l'énergie collaborative
becomes:
2013-annee-de-l-nergie-collaborative (see the missing “e” at the beginning of “energie”)

If I click the URL on the newly created page, then use the “Create from title” button I get a different result, with the previously missing “e”:
2013-annee-de-l-energie-collaborative

I wonder why I get different results… Is there a reason or is this a bug?

Also the fact that the leading year is ignored when the page is created, but is added with “Create from title”, is puzzling me.

The folder is created as:
20130102-annee-de-l-nergie-collaborative
and after “Create from title” becomes:
20130102-2013-annee-de-l-energie-collaborative

Perhaps it it is only possible because these pages are sorted by date, but Kirby doesn’t take it into account when the page is added so it always removes leading numbers?

Leading numbers are not possible in Kirby because they are treated as visibility flags, so if you create a page name with a leading title, it becomes part of the folder name and makes the page visible, but does not become part of the URL.

The missing character is definitely a bug.

And the fact that you can create a url with a leading number from the title should also be impossible, because in case you want to make the page invisible, it would not happen because of the second number.

I actually wish we could have a different numbering/visibility scheme, maybe using something like a number followed by a dot (“01.2014-some-title”).

Edit: What version of Kirby are you using? I wonder if it it related to this bug, which was supposed to be fixed in 2.4.1.

Ooh this is another bug then. When I try to make the page invisible I get an error (“The page could not be found”) but the page is actually renamed without the incorrect leading number. Then I can make it invisible, but its URL has changed, which can be a problem if it is linked somewhere else.

Regarding the missing “e”, I have yet to update to 2.4.1, I’ll test it in the next couple days.
Thank you!

I’ve had the same issue on Portuguese site where an character with accent would be missed in the slug. It’s not always and I never got a chance to investigate it further.

I just did a test with a Starterkit and couldn’t reproduce the issue. I tried the string above and some other strings in different languages without any issues in 2.4.1.

1 Like

Just upgraded to 2.4.1 and the missing character issue is indeed solved :slight_smile:

The leading year issue is still present tough, I’ll create an issue on Github.
Edit: Issue 326 is related.

Yes, please, thank you!

Yes, it is. But as I suggested above, I’d prefer another numbering scheme (even though that would mean that old versions wouldn’t be compatible anymore).

1 Like