statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

setting the default locale url different to "/" ruins control panel #2527

Closed verybigelephants closed 4 years ago

verybigelephants commented 4 years ago

Describe the bug I would like to prefix all urls by my locale slug. For example, english would be on a domain.com/en/... and all the austrian articles would be on domain.com/at/... i do not wish to have domain.com/ urls and would redirect them to the default locale if someone navigated to "/". however, when i set this, all the links generated in control panel stop working, because they generate /en/cp, while cp still works on url /cp.

setting "$control_panel" to 'sk/cp' doesn't work neither, as then the control panel generates links like /sk/sk/cp.

To Reproduce Steps to reproduce the behavior:

  1. Fresh statamic install
  2. set two locales: sk sk_SK Slovak http://my-dev-website.test/sk en en_US English http://my-dev-website.test/en
  3. refresh and ruin links in your control panel

Expected behavior A working control panel that generates correct control panel links, regardless of default locale's root url

Environment details (please complete the following information):

jasonvarga commented 4 years ago

At the moment you cannot have only subdirectory based sites. The default needs to be the root.

This may be possible in v3, but not v2 unfortunately.

verybigelephants commented 4 years ago

could this be tagged as a feature request then?