Relation widget shows "No {{fields.name}}" when collapsed and search results always return "No options"
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
**Describe the bug**
Relation widget shows "No {{fields.name}}" when collapsed and search results always return "No options".
**To Reproduce**
1. Go to a relation widget.
2. See collapsed state shows "No {{fields.name}}".
3. Expand relation widget.
4. See value _does_ exist in the selected dropdown value.
5. Focus into search and attempt to search for an entry
6. See that all searches return "No options".
**Expected behavior**
Collapsed state of relation widget should show the selected entry. Relation widget should also return results when searching within the field (when there are matching results).
**Screenshots**
**Applicable Versions:**
- Decap CMS version: 3.8.0
- Git provider: GitHub
- OS: macOS Sequoia 15.5
- Browser version Chromium Version 135.0.7049.95 (Official Build, ungoogled-chromium) (arm64)
- Node.JS version: n/a
**CMS configuration**
```display_url: https://www.carolinepardilla.com/admin/
show_preview_links: false
editor:
preview: false
backend:
name: git-gateway
branch: main # Branch to update (optional; defaults to master)
media_folder: "assets/images" # Media files will be stored in the repo under images/uploads
public_folder: "/images"
collections:
- label: "Homepage"
name: "homepage"
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}}"
- {label: "Instagram Heading", name: ig_heading, widget: string}
- {label: "Instagram Embed", name: ig_embed, widget: code}
# - label: "Margarita Time Bibliography"
# name: "margarita-time-bibliography"
# file: "content/margarita-time-bibliography.md"
# fields:
# - {label: "Title", name: title, widget: string}
# - {label: "Body", name: body, widget: markdown}
- name: "entries" # Used in routes, e.g., /admin/collections/blog
label: "Entries" # Used in the UI
folder: "content/entries" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
filter: {field: "headless"}
slug: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
sortable_fields: ['title', 'date']
summary: "{{title}} - {{month}}/{{day}}/{{year}}"
fields: # The fields for each document, usually in front matter
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
# - {label: "Draft", name: "draft", widget: "boolean", default: true}
- {label: "Featured Image", name: "thumbnail", widget: "image", choose_url: false}
- {label: "Link", name: "link", widget: "string", required: false}
- {label: "Publication", name: "publications", widget: "string", required: false}
- {label: "Category", name: "topics", widget: "string"}
- {label: "Body", name: body, widget: markdown, required: false}
- name: "pages" # Used in routes, e.g., /admin/collections/blog
label: "Pages" # Used in the UI
folder: "content/pages" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
filter: {field: "headless"}
slug: "{{title}}" # Filename template, e.g., YYYY-MM-DD-title.md
sortable_fields: ['title', 'date']
summary: "{{title}}"
fields: # The fields for each document, usually in front matter
- {label: "Title", name: title, widget: string}
- {label: "Publish Date", name: "date", widget: "hidden"}
- {label: "Body", name: body, widget: markdown}
- label: "Contact"
name: "contact"
files:
- label: "Contact"
name: "contact"
file: "content/contact.md"
fields:
- {label: "Title", name: title, widget: string}
- {label: "Body", name: body, widget: markdown}
- label: "Config"
name: "config"
files:
- label: "Config"
name: "config"
file: "config.toml"
fields:
- label: "Params"
name: params
widget: object
fields:
- {label: "SEO Title", name: seo_title, widget: string}
- {label: "SEO Description", name: seo_description, widget: text}
- {label: "SEO Image", name: "thumbnail", widget: "image", choose_url: false}
- label: "Menu"
name: menu
widget: object
fields:
- label: "Main"
name: main
widget: list
fields:
- {label: "Name", name: name, widget: string}
- {label: "Identifier", name: identifier, widget: string}
- {label: "URL", name: url, widget: string}
- {label: "Order", name: weight, widget: number}
# - name: "posts" # Used in routes, e.g., /admin/collections/blog
# label: "Posts" # Used in the UI
# folder: "content/posts" # The path to the folder where the documents are stored
# create: false # Allow users to create new documents in this collection
# slug: "/{{year}}/{{month}}/{{day}}/{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
# fields: # The fields for each document, usually in front matter
# - {label: "Title", name: "title", widget: "string"}
# - {label: "Author", name: "author", widget: "string"}
# - {label: "Publish Date", name: "date", widget: "datetime"}
# - {label: "Featured Image", name: "thumbnail", widget: "image"}
# - {label: "URL", name: "url", widget: "string"}
# - {label: "Category", name: "topics", widget: "string"}
```
**Additional context**
This was not an issue when my client last made an update on 7/6/2025. Could this be related to #7497 ?
Contributor guide
Assessment
This issue has not been assessed yet.