Your query must return a set of pages error on pages panel field

Hi all - I am currently struggling with the query option for the ‘pages’ field type in a featured pages block I’m trying to build.

I want to be able to only select from children of a page called ‘supplier stories’.

However when i use the code below I get the following error when trying to use the block in the panel: “Your query must return a set of pages”.

fields:
      featured:
        label: Featured stories
        type: pages
        query: site.find('supplier-stories')

The docs.) says this method above is for only children of a specified page, which is what I’ve done.

The page is published, and I have tried both the ‘supplier-stories’ slug and the ‘Supplier stories’ case sensitive name. What simple thing am I missing here?

Thanks

Where in the page tree is that page located?

Thanks, so that made me assume I need to put the path in there, so working now. I assumed that the ‘search’ query would find the page based on the slug alone.

No, a path needs to be unique, but a slug can exist in multiple locations in the page tree (e.g. notes/page-1, photography/page-1 etc)

1 Like

Gotcha, thank you