decaporg / decaporg/decap-cms

meta: path should allow for blank paths upon publishing...fallback to path:

Open
#7,094 0 comments 1 reaction 0 assignees View on GitHub
area: nested-collections type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

I don't want a user to have to specify a path when 99% of the time, decap-cms already does the right thing, but I do want a user to be able to override/move a file upon edit if necessary.

I've added the meta: path: fields to my configuration:

```
meta:
path:
index_file: index
label: Path
required: false <----
widget: string
```

When I create a new page, the path field shows up on top, as expected.
If I do not fill in the path field, it won't let me publish, giving me the error message:

`%{PATH} is not a valid path`

Screenshot 2024-02-06 at 10 29 58 PM

However, it really isn't necessary for there to be a non-blank path field upon publishing. If I hadn't added meta: path: in my config, it would have defaulted to the path: and slug: parameters. With an unspecified path, it should do the same rather than refuse the publish.

decap-cms-app 3.1.1
decap-cms-core 3.3.1
decap-cms 3.1.1

**CMS configuration**
https://gist.github.com/pleasantone/b7002738f89ae039cc9a72a21fc69c8f

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.