List of relation: `value_field` works with "title" but not "slug"

I’m trying to create a widget to choose an article from an existing set of articles. I’m using a “list” of “relation” widget. So far, it works when I set value_field to “title”, but not when I set value_field to “slug”. When set to “slug”, the autosuggestion dropdown only shows one item and defaults to the first in the collection (alphabetically). Although I am able to still search an article, the selection is not saved. I’m using Hugo and need to reference by slug.

This works:

collections:
  - label: "Pages"
    name: "pages"
    files:
      - label: "Homepage"
        name: "homepage"
        file: "content/_index.md"
        fields:
          - {label: "Title", name: title, widget: string}
          - {label: "Profile Photo", name: profile_photo, widget: image, choose_url: false}
          - {label: "Bio", name: body, widget: markdown}
          - label: "Top Posts"
            name: "top_posts"
            widget: "list"
            summary: '{{title}}'
            fields:
              - label: "Post"
                name: "featured_entries"
                widget: "relation"
                collection: "entries"
                max: 4
                search_fields: ["title", "publications", "topics"]
                display_fields: ["{{title}}"]
                value_field: "title"

This does not work:

collections:
  - label: "Pages"
    name: "pages"
    files:
      - label: "Homepage"
        name: "homepage"
        file: "content/_index.md"
        fields:
          - {label: "Title", name: title, widget: string}
          - {label: "Profile Photo", name: profile_photo, widget: image, choose_url: false}
          - {label: "Bio", name: body, widget: markdown}
          - label: "Top Posts"
            name: "top_posts"
            widget: "list"
            summary: '{{title}}'
            fields:
              - label: "Post"
                name: "featured_entries"
                widget: "relation"
                collection: "entries"
                max: 4
                search_fields: ["title", "publications", "topics"]
                display_fields: ["{{title}}"]
                value_field: "slug"

Hi there! Thanks for your interest in Netlify CMS. Looks like you posted your question a little while ago, but that you haven’t received a solution yet. Here’s where you might get more help:

netlifycms.org - the site houses our extensive documentation that likely contains helpful information to get you back on track.

netlify cms slack - join our friendly slack channel and chat with other cms pros to get the help you need.

GitHub Issues - think you’ve found a bug, or would like to make a feature request? Make your voice heard here. Netlify CMS is open source - PRs and other contributions are also welcome!

Stack Overflow Check StackOverflow for questions tagged “Netlify CMS” if you don’t get an answer in the Slack or the GH issues. StackOverflow reaches a worldwide audience of knowledgeable people.

Your question will be left open here for anyone to comment - but we encourage you to check out the above resources if you are still looking for a solution!