Skip to content
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

Deleting a folder through admin panel deletes /user/pages #796

Closed
hansvana opened this issue Sep 24, 2016 · 3 comments
Closed

Deleting a folder through admin panel deletes /user/pages #796

hansvana opened this issue Sep 24, 2016 · 3 comments
Labels

Comments

@hansvana
Copy link

hansvana commented Sep 24, 2016

Grav v1.1.5 - Admin v1.2.2 - Installed today

Steps to reproduce, tested a couple of times:

  1. Add a folder through the button at the right-top of the admin panel
  2. Name it 01:test
  3. Delete it by pressing the X beside the folder name in Pages view

After that an error states /user/pages does not exist, and indeed it is gone. The problem seems to be in the colon, names like 01test, 01 test or 01-test work as expected.

@rhukster rhukster added the bug label Sep 26, 2016
@rhukster
Copy link
Member

Folder's should not even be able to be named with a colon, but that said, it shouldn't delete like that anyway. I will look into it! Thanks!

@rhukster
Copy link
Member

BTW, here's what i suspect is happening in this case:

  1. Grav things you've passed a paramater (x:y) with 01 as the key and test as the value.
  2. Grav stores this and strips that from the URL. You are then left with the root user/pages folder location.
  3. On delete this is removed, producing what you are seeing.

Short fix, don't use : in a folder name!
Better fix, we'll stop you from using : in a folder name! :)

@rhukster
Copy link
Member

Ok, i've stopped Grav from supporting folders with the param_sep value (: by default) in the folder name. This is just going to lead to all kinds of trouble. And the cleaner fix is to just not process these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants