Describe the bug
When creating an entry in a nested collection, the {{ dirname }} placeholder appears to not be set for public_folder.
Using the following collection:
- label: Dokumentmappar
label_singular: Dokumentmapp
name: documents
folder: src/dokument/
create: true
nested:
summary: "{{ fields.title }}"
depth: 10
fields:
- {label: Titel, name: title}
- {label: Anteckningar, name: body, widget: markdown, required: false}
- {name: permalink, widget: hidden, default: false}
- label: Dokument
name: files
widget: list
summary: "{{ fields.file }}"
field:
name: file
widget: file
media_folder: "/src/dokument/{{ dirname }}"
public_folder: "/dokument/{{ dirname }}"
this causes the file paths for public_folder to get improperly set, despite the files getting placed correctly by the media_folder attribute.
To Reproduce
- Use the above collection configuration.
- Create a nested entry with files attached.
- Notice that the filepaths set in the .md file is
/dokument/filename.ext instead of /dokument/nested/filename.ext
- Notice that the files are in the correct position, and editing the nested entry yields the correct paths.
Expected behavior
Files created should have their filepaths correctly set.
Screenshots
n/a
Applicable Versions:
- Decap CMS version: 3.10.1
- Git provider: GitLab
- OS: Ubuntu
- Browser version: Mozilla Firefox 148.0
- Node.JS version: v22.22.1
CMS configuration
https://git.ludd.ltu.se/lulespexet/www/-/blob/master/src/admin/config.yml
Additional context
Example commit: https://git.ludd.ltu.se/lulespexet/www/-/commit/ba5b2f6ae8cd03081fe3ab21ecd813f911d7dda5
Describe the bug
When creating an entry in a nested collection, the
{{ dirname }}placeholder appears to not be set forpublic_folder.Using the following collection:
this causes the file paths for
public_folderto get improperly set, despite the files getting placed correctly by themedia_folderattribute.To Reproduce
/dokument/filename.extinstead of/dokument/nested/filename.extExpected behavior
Files created should have their filepaths correctly set.
Screenshots
n/a
Applicable Versions:
CMS configuration
https://git.ludd.ltu.se/lulespexet/www/-/blob/master/src/admin/config.yml
Additional context
Example commit: https://git.ludd.ltu.se/lulespexet/www/-/commit/ba5b2f6ae8cd03081fe3ab21ecd813f911d7dda5