Call to undefined method Kirby\Query\Query::result()

I’m working on upgrading one of my sites from Kirby 3 → Kirby 4. I had a query in the panel to display pages/posts from a certain category. However, when I try to run this query I get the error:

Call to undefined method Kirby\Query\Query::result()

The relevant part of the blueprint looks something like this:

query: site.find("products").children.listed.filterBy('category','prints')

“category” is included as an attribute of each “product” page. I’m a bit stumped so any help is much appreciated. Thank you!

The query itself looks fine, but could you please provide more context as to where this is used, ideally the complete field definition from the blueprint. Also, are there any error details like a stack trace, e.g. in the console?

hi yes of course, here is the field definition:

- width: 1/3 
    sections:  
      content2:
        type: fields
        fields:
          headline2:
            label: By Category
            type: headline
            numbered: false 
      category1:
        sortable: true
        headline: Prints
        type: pagesdisplay
        query: site.find("products").children.listed.filterBy('category','prints')

(it repeats for a few categories after this)

this is used in the panel to organize sub categories of products. a product can then be entered into a category from it’s product page.

i’ve been trying to figure out how to set up / find a stack trace, but have run into a bit of a block. i followed the instructions here:

to get xdebug set up with vscode, but for some reason i can’t get the ports to listen to each other properly… i’m sorry to ask, but is there another way to get a stacktrace on this error?

in case it’s helpful, here’s the error i’m seeing in the panel:

thank you!

Oh, wait, you are using a plugin here for the section. This has been archived and is not compatible with Kirby 4

You can replace it with a standard pages section now

that solved the issue! thank you :slight_smile: