Autocomplete tags when creating a draft won't work

I noticed that when I create a new draft the autocomplete won’t work until I’ve published it and reloaded the page. I’m using kirby 3.3.1. Anyone else having this issue?

Here is my field blueprint:

    label: Tags
    type: tags
    width: 1/1
    min: 1
    options: query
    query: page.siblings.pluck("tags", ",", true)

Thats by quirk of design. That query looks for tags on the pages siblings - it’s a draft, and so does not have any sibliings yet. (unless you make more drafts that have tags). In this case, the siblings are whatever pages are in the _drafts folder.

To autocomplete the tags while it is a draft, you would need to change the query to target the published pages.

I used page.siblings.listed.pluck("tags", ",", true) before, and just tried it again, but no change on behavior.

Thats the problem part, and why there was no change in behaviour. Your still telling it to look at the pages sibliings. You need to find the parent page the draft will belong to when its published instead, and looked at it’s children.

query: site.find('yourparentpage').children.pluck("tags", ",", true)
1 Like

oh, I get it now! Thanks a lot!
It ended like this for me, 'cause I wanted only the listed pages tags: query: site.find('parentpage').children.listed.pluck("tags", ",", true)