Change slug field in panel, not directory

Is it correct when you change the ‘slug’/‘url’ with the panel, Kirby tries to rename the directory file? I had the following issue:

  1. The ‘gallery’ directory contains a Dutch translation file with ‘slug: gallerij’. This contains a typo. In Dutch, it should be ‘galerij’, not ‘gallerij’.
  2. As an admin I change the slug with the panel from ‘gallerij’ to ‘galerij’. So it presents the translated slug and not the directory name.
  3. Now it tries to rename the English directory name ‘gallery’ to ‘galerij’ and creates a duplicate directory and fails to remove the old ‘gallery’ directory.
  4. This created errors because some code uses ‘gallery’ to find the title and url for a link.

I expected only the slug field for the Dutch translation file would change. Is this expected behavior and how should I make sure the user cannot change directories, just the slug inside the translations? I have the latest version of Kirby.

The expected behavior is:

  • if you change the slug for the default language, the folder name should be changed
  • if you change the slug for a secondary language, the slug field should be updated

If that doesn’t work (haven’t tested yet), it might be a :bug:.

Dutch is the default language, but I always use English for code/file names. The structure I use is: gallery/gallery.nl.txt

Apart from that, there is definitely a bug: when I click ‘Change URL’ in the panel, it shows the Dutch slug from the slug field and not the directory name. If what you say is true, the text input should show the directory name, because it is going to change that.

Yes, but if you want a dutch slug in your Url, you have to change the folder name. The slug field is only for non-default languages and should not be in your default language text file nor in your blueprint. It might be a bug though.