Default value for Pages not working

Hi,
I’m trying to make the page ‘definition-des-variantes’ appears as a default choice in a field type: pages.
But none of my attempts in ‘default’ works. :smiling_face_with_tear:

  donneessupp:
    width: 1/2
    sections:
      fields:
        fields:
          test1:
            type: pages
            query: site.children.filterBy('intendedTemplate', 'def-variantes')
            default: 
              - definition-des-variantes
            #default: definition-des-variantes
            #default: pages/definition-des-variantes
            #default: 
            #  - pages/definition-des-variantes
            min: 1
            max: 1

I just did a quick test on a starterkit and all these seems to work just fine for me

testing:
  type    : pages
  query   : site.children
  default : page://D1yCxHPlHzgzBJI5
  default : about
  default :
    - about

So to me looks like the issue is specific to your setup and so without more information is hard to figure out why it’s not working for you.

Also keep in mind that this only works for new page creation. If the page is already present the updated default value won’t show up for you.

Thank you for your answer.

It made me retest a lot of things… and the culprit is the dash!
More exactly the number of dashes in the page id.
One dash is fine, two dashes are not! :crazy_face:

I renamed my page id to “definition-desvariantes” and it works. :sob: