Repository navigation
fix(core): allow uppercase characters in nested collection meta path - #8007
Merged
martinjagodic merged 1 commit intoOct 23, 2026
Merged
Conversation
✅ Deploy Preview for decap-cms ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
|
Released in v3.17.2 |
This was referenced Nov 7, 2026
martinjagodic
added a commit
that referenced
this pull request
Nov 17, 2026
* fix(core): keep the case of nested entry paths in their slug Since #8007 the meta path of a nested collection may contain uppercase characters, but slugFromCustomPath still lowercased the whole path. The file was committed at `pages/Guides/index.md` while persistEntry returned the slug `guides/index`. Because that slug differs from the entry's, the persist action reloaded `guides/index` right after the save, which a case-sensitive git host cannot find, leaving the editor on an entry that fails to load. Saving an existing entry already in such a folder had the same effect, and the collision check for a new entry probed the lowercased path instead of the one about to be written. Strip the collection folder without changing the case of the path. Fixes #8068 * fix(core): derive nested slugs the way listing does Build the slug of a saved entry with selectEntrySlug, the same helper that names listed entries, so the two can no longer disagree. Strip only the leading collection folder, since a nested path may repeat the folder's name further down. Also dispatch the entry reload after publishing a nested entry, which never ran. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Martin Jagodic <jagodicmartin1@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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 #7461
validateMetaFieldchecks thepathmeta field by running each segment through the slug processor and comparing the result with the original value. The slug processor lower-cases its input, so any path containing capital letters (e.g.Parent/Child) was rejected as an invalid path, including existing entries that live in capitalised folders.The comparison now ignores case (using the same
toLocaleLowerCase()asprepareSlug), so capitalised folder names are accepted while paths with characters the slug sanitizer would change (spaces, quotes, periods, etc.) are still rejected.Test plan
validateMetaField: a path with uppercase characters is valid; a path with uppercase and invalid characters is still rejected.pnpm run test:unit,pnpm run lint-quietandpnpm run type-checkpass locally.Checklist