Repository navigation
fix(core): allow a blank meta path when it is not required - #8058
Merged
Merged
Conversation
A nested collection's meta path field can be set to `required: false`, but validation still rejected an empty value as an invalid path. An empty path is now accepted for optional fields, and the entry falls back to the collection path and slug as it does without a meta path. Fixes decaporg#7094
✅ Deploy Preview for decap-cms ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Documents the option and rejects non-boolean values such as "false". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
martinjagodic
approved these changes
Nov 17, 2026
martinjagodic
enabled auto-merge (squash)
November 17, 2026 09:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7094
A nested collection's
meta.pathfield can be markedrequired: false, butvalidateMetaFieldstill returned "is not a valid path" for an empty value, so the entry could not be saved. Empty values are now accepted when the field is optional. Saving already handles a blank path:selectCustomPathreturns nothing, so new entries use the collectionpath/slugand existing entries keep their current path. Non-empty values are still validated as before, and required meta paths behave the same. Also addsrequiredto theEntryFieldtype.Test plan
pnpm run test:unit,pnpm run lint-quietandpnpm run type-checkpass.Checklist