Skip to content

[Panel] "Change Status" Dialog Loads Siblings When Unnecessary (Automatic Numbering) #2052

@neildaniels

Description

@neildaniels

Describe the bug
When opening a "Change Status" dialog in the Panel, it sometimes takes seconds to load. Looking at the API responses happening, I suspect its because it's loading every sibling, even though for the specific template in question, siblings seems completely unnecessary.

To Reproduce
Steps to reproduce the behavior:

  1. Have a template that uses automatic numbering in the Blueprint, such as:
num: '{{ page.created.toDate("YmdHi", "now") }}'
  1. Within a pages section, click on a status change button to bring up the dialog.

The Panel loads an AJAX call such as:

https://thestreamable.com/api/pages/news+test-post?select=id,status,num,errors,siblings,blueprint

This response has hundreds of siblings (for our site). Normally the siblings would be used to indicate where the post in question should be ordered into. However, because numbering is set to automatic, the siblings are never displayed on this page are seemingly unneeded.

I think the burden of loading almost ~1500 pages is too strenuous in this situation. Can there be an optimization to exclude siblings when they're not needed? Or, at least somehow speed it up (by maybe avoid reading the text fields for actual title content).

Kirby Version
3.2.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions