Panel error and folder increment error

Hi there.

I’m almost done migrating a wordpress blog to Kirby but I have a problem. My content folder structure is done this way:

Content
|- blog (contains all blog posts)
|-- blog posts (folders and files containing each blog post)

I can create a new blog post, edit it and save it. But when I try to turn the post to visible, I get this message: “The directory could ne be moved”. The same happens when I try to delete the post. Then if I quit or refresh, the post has been transformed as a visible blog post (or deleted) but the blog post folder name has the same number as the previous one. For example, I have 336 posts in the blog. The new one is also labelled as 336 instead of 337 after I try to make it visible.

The folders have the same rights: 755. And the files are 644.

Is there something I missed in my blueprint or is it a bug? Thanks for your time.

Edit: I forgot to mention something. The blog is on a subdomain and therefore the content/site/thumbs folder are within another folder and the subdomain roots and urls are configured within the site.php file.

Edit2: I did more testing and it only happens in this specific folder. I tried into another folder containing other blog posts and it works. I really don’t understand what’s going on.

Ok found the bug. It was a folder with a ♪ in the name.
It comes from a difference about how WP and Kirby handles permalinks. WP permits you to use special characters even in permalinks. So when you migrate and wants to keep your permalinks ok, keeping the ♪ in the folder name sounds logical but Kirby didn’t like it and didn’t count the folder.

So when it toggled visibility, kirby was lacking a folder in the count and numeroted it has one already existed. Problem fixed!

Hm…
That still sounds like a bug. You shouldn’t use UTF-8 characters in your UIDs (to make sure the URLs work everywhere), but counting the pages should still work with UTF-8 chars.

Could you please open an issue on GitHub in the Panel repository with steps to reproduce the problem so that this can be fixed?

I’ll do it as soon as I can, sure.

@lukasbestle While trying to replicate the bug with another install I realized I could not do it and that’s because I was using Kirby 2.1.1 while my website was on Kirby 2.1.0. After updating my Kirby install I tried to re-change the folder by adding ♪ again and creating a new post… And no bug!

So I suppose it was corrected by Kirby 2.1.1. :slight_smile:

1 Like