# Sorting of pages fails

**URL:** <https://forum.getkirby.com/t/sorting-of-pages-fails/10193>\
**Category:** Questions\
**Tags:** v2\
**Created:** [April 10, 2018, 7:34pm UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193 "2018-04-10T19:34:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![phoenixh](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phoenixh](https://forum.getkirby.com/u/phoenixh)\
**Post date:** [April 10, 2018, 7:34pm UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/1 "2018-04-10T19:34:27Z")

</div>

Hello there

i am having trouble sorting the pages in the panel.  
As you can see in the video i want put “Media” Second and “Training” Third.

https://www.youtube.com/embed/ROTVXoiM2UE?feature=oembed&wmode=opaque

Do you know why i cant sort the pages as i am dragging them?

Thank you

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 10, 2018, 7:36pm UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/2 "2018-04-10T19:36:44Z")

</div>

What is your Kirby version? There was a bug in 2.5.9 that was fixed in 2.5.10.

---

<div class="post-metadata">

**Author:** ![phoenixh](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phoenixh](https://forum.getkirby.com/u/phoenixh)\
**Post date:** [April 10, 2018, 8:04pm UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/3 "2018-04-10T20:04:23Z")

</div>

Oh nice, i got the 2.5.9er Version 😕

If i updated Kirby on localhost by CLI and then push the files via git and pull them on server, that shall work?

But i think i will do that tomorrow, too late for an update test 😃

---

<div class="post-metadata">

**Author:** ![phoenixh](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phoenixh](https://forum.getkirby.com/u/phoenixh)\
**Post date:** [April 10, 2018, 8:05pm UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/4 "2018-04-10T20:05:54Z")

</div>

I will let you know tomorrow @texnixe

---

<div class="post-metadata">

**Author:** ![phoenixh](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phoenixh](https://forum.getkirby.com/u/phoenixh)\
**Post date:** [April 11, 2018, 6:58am UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/5 "2018-04-11T06:58:43Z")

</div>

Hello and morning  
also i noticed on my localhost, there are many files with same order number. Here you can see “2-suchergbenis” and “2-material”. Yesterday i had even more with “2-”. Also with “3-”. I renamed the folders with a “.” in front.

Is that a thing caused by the 2.5.9er bug?

![32](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/a/a91b98c9789afd9d3e39c16105f3bb24f25ad785.png)

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 11, 2018, 7:04am UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/6 "2018-04-11T07:04:37Z")

</div>

Probably. However, they show automatically resort themselves as soon as you sort them again in the Panel. But remove the dots again before you do so.

---

<div class="post-metadata">

**Author:** ![phoenixh](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phoenixh](https://forum.getkirby.com/u/phoenixh)\
**Post date:** [April 11, 2018, 7:21am UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/7 "2018-04-11T07:21:06Z")

</div>

But isnt the sorting made by the number before the foldername?  
Yesterday i had 5 folders beginning with “2-” so i renamed them.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 11, 2018, 7:30am UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/8 "2018-04-11T07:30:06Z")

</div>

Yes, the sorting is done with the prepended number. Now that I think of it, the duplicate pages might actually be an effect of your reordering in the Panel and then pushing the content to the repo? In any case, you should check if those pages have the same content and then remove the ones that are not needed anymore. Then add and remove properly in your repo and push again to the remote.

---

<div class="post-metadata">

**Author:** ![phoenixh](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phoenixh](https://forum.getkirby.com/u/phoenixh)\
**Post date:** [April 11, 2018, 7:31am UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/9 "2018-04-11T07:31:51Z")

</div>

Yes, currently we are checking the content.

But if i am reordering on server, submitting and pull it to localhost. The ordering shall be correct on both systems or am i wrong?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 11, 2018, 7:36am UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/10 "2018-04-11T07:36:17Z")

</div>

Yes. But if you rename a page, in the git context, that amounts to adding and deleting folders. So you then have to actually remove the file from the repo (git rm), otherwise you might end up with duplicate content.

---

<div class="post-metadata">

**Author:** ![phoenixh](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phoenixh](https://forum.getkirby.com/u/phoenixh)\
**Post date:** [April 11, 2018, 7:38am UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/11 "2018-04-11T07:38:16Z")

</div>

Now i am lost and cofused. 😕

When i rename a folder via panel online, i commit that changed. The folder is not removed?

So i have to remove that folder manually? Or what is the best practice?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 11, 2018, 7:47am UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/12 "2018-04-11T07:47:18Z")

</div>

Well, yes, if your working directory is clean, everything should work fine. It was a guess, because these things have happened before.

---

<div class="post-metadata">

**Author:** ![phoenixh](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phoenixh](https://forum.getkirby.com/u/phoenixh)\
**Post date:** [April 11, 2018, 7:55am UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/13 "2018-04-11T07:55:54Z")

</div>

Okay, i will clean up first. Then update and then i will check if that thing i coming up again.

I will let you know here.

Thank you for your help so far.

---

<div class="post-metadata">

**Author:** ![phoenixh](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phoenixh](https://forum.getkirby.com/u/phoenixh)\
**Post date:** [April 11, 2018, 7:49pm UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/14 "2018-04-11T19:49:46Z")

</div>

Hello again,

i updated to 2.5.10 and i just orded the page “Datenschutz” and the effect is that the site i duplicated.  
3-datenschutz and 10-datenschutz

I am getting lost. I really need help on that here.

 ![40](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/9/9a3160fc355930b1304626de4e9e8f2d30a74474.png)

Thank you all!

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 11, 2018, 8:14pm UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/15 "2018-04-11T20:14:39Z")

</div>

How can I reproduce this? Just by sorting pages in the Panel?

---

<div class="post-metadata">

**Author:** ![phoenixh](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phoenixh](https://forum.getkirby.com/u/phoenixh)\
**Post date:** [April 11, 2018, 8:21pm UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/16 "2018-04-11T20:21:45Z")

</div>

Yes.  
I will now do following:  
I will copy the content/\* onto Desktop, delete unused folders, rename to sort from 1-10 and then sort again.

Let’s see what may happen.

---

<div class="post-metadata">

**Author:** ![phoenixh](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phoenixh](https://forum.getkirby.com/u/phoenixh)\
**Post date:** [April 11, 2018, 8:29pm UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/17 "2018-04-11T20:29:54Z")

</div>

Here it is before sorting:

 ![29](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/f/fa991a60b325592439f80bddc010faecea266631.png)

Here after i sorted 10-Impressum above 11-Datenschutz

 ![34](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/e/ee2697dc0f07756011ec248b4355d995e899e0dd.png)

As you can see Kirby is sorting 11 before 10. WHY?!

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 11, 2018, 8:33pm UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/18 "2018-04-11T20:33:02Z")

</div>

How did you update Kirby? Are Kirby, Panel and the Toolkit at 2.5.10 now? I really can’t reproduce it, neither in a fresh Starterkit where I added 10+ projects nor in a project I’m currently working on.

---

<div class="post-metadata">

**Author:** ![phoenixh](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phoenixh](https://forum.getkirby.com/u/phoenixh)\
**Post date:** [April 11, 2018, 8:34pm UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/19 "2018-04-11T20:34:24Z")

</div>

![53](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/4/49aa01a6199488246312b7234d08cc74c4e526dd.png)

~/.composer/vendor/bin/kirby update

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 11, 2018, 8:37pm UTC](https://forum.getkirby.com/t/sorting-of-pages-fails/10193/20 "2018-04-11T20:37:08Z")

</div>

Hm, I don’t know what to do.Did you still get duplicate pages after this last experiment? Or is only the sorting order in the sidebar incorrect?

[Next page](https://forum.getkirby.com/t/sorting-of-pages-fails/10193.md?page=2)
