getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.31k stars 168 forks source link

[Api] Wrong order of site files in JSON #1498

Closed robinscholz closed 5 years ago

robinscholz commented 5 years ago

Describe the bug The sort order of site images is not respected in the generated JSON. Instead images are returned alphabetically.

To reproduce Steps to reproduce the behavior:

  1. Download the starterkit
  2. Adjust the site blueprint:
title: Site

columns:
  - width: 1/2
    sections:
      albums: sections/albums
      images:
        type: files
        query: site.files
        layout: cards
        template: image
  - width: 1/2
    sections:
      notes: sections/notes
      pages:
        type: pages
        create: default
        template:
          - about
          - home
          - default
  1. Enable basic auth
  2. Add some images to the site folder and change their order in the panel
  3. Send a post request to /api/site?select=files

Expected behavior Images should be included in the array in the correct sorting order

Kirby Version 3.0.2

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

bastianallgeier commented 5 years ago