Skip to content

Query has unexpected behavior with add() #2511

@hdodov

Description

@hdodov

Describe the bug

This query returns the correct set of pages:

page.children

This one also returns the correct set:

site.children.template('modules').index

However, if I try to combine them:

page.children.add(site.children.template('modules').index)

I get the error:

Your query must return a set of pages

What's also strange is that if I add a listed filter to the mix:

page.children.add(site.children.template('modules').index).listed

...I get the correctly filtered result of page.children, i.e. it's the same as if I used

page.children.listed

To Reproduce
Steps to reproduce the behavior:

  1. Add a bunch of pages with different templates
  2. Try the queries above

Expected behavior
The result of the problematic query should be the combined result of the first two queries that work as expected.

Kirby Version
3.3.4

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions