List of suggested tags

Hey everyone,
Is it normal that the status (Draft, Published) is taken into account when selecting the tag in the panel?
Only after publishing will the previously used tags be suggested to me. If the post is in draft, the suggestion only shows tags from other drafts.

Could you post your tags field definition, please?

In the blueprint it looks like this:

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

Yes, siblings on searches within the same status. Use this instead:

query: page.parent.childrenAndDrafts.pluck("tags", ",", true)

Thank you for the tip. But that doesn’t make it any better:
Invalid query result data: NULL

Hm, works for me. Or are the pages you are using this in direct children of site?

I’m not sure I understand the question correctly.
All published posts are located in a subfolder of /content. The folders there are called, for example, 20250101 Test, 20250102 Further Test. Drafts are in /content/_drafts.
The post.txt file is located in each folder and, among other things, has the field tags.
So far, so normal, right?

Yes and no, I was under the impression that these posts had a parent like posts or blog, but if they sit directly in the content folder, they are children of site, so the query needs to be modified:

query: site.childrenAndDrafts.pluck("tags", ",", true)

This query will then also include all other first level pages like home and error, which doesn’t matter much in this case as these most likely don’t have a tags field. To be on the safe side, you could filter the above by intended template.

Great, thank you very much. Now I understand it and it works. Win, win, then.