Issue: YAML Data files read but not written #590

Closed
opened 2026-10-05 02:54:39 +02:00 by adam · 1 comment
Owner

Describe the bug
When using data files of type yaml in FrontMatter v9.4.0 and trying to enter data entries in the Data File View of the Dashboard, a given entry is not written to the (already existing, but empty) yaml file, although there is this little "pop-up window" shown in the top-right corner "Updated your data entries".

On the contrary, when I prefill in data in the yaml file manually, that data entry is listed in the Data File View, but adding new entries from FrontMatter's dashboard is still not possible.

Note: Writing data entries works as expected in case of json data files.

To Reproduce
Steps to reproduce the behavior:

  1. reproduce the data file definition as listed in section Additional context
  2. create an empty activities.yaml file in the project root
  3. get to the Data File View of the FrontMatter dashboard
  4. select "Activitities" in column "Select your data type"
  5. enter same sample data in the Title edit box on the right
  6. click the Add button
  7. "Updated your data entries" appears on the top-right
  8. "Your activities data items" column remains empty, just showing "No activities data entries found"

Expected behavior
The data entry is written to the specified data file and shown in the Data File View.

Additional context
Data file definition in .frontmatter/config/data/files named activities.json (using the Splitting your settings in multiple files feature):

{
  "$schema": "https://frontmatter.codes/config/data.files.schema.json",
  "id": "activities",
  "title": "Activities",
  "file": "[[workspace]]/activities.yaml",
  "fileType": "yaml",
  "singleEntry": false,
  "labelField": "title",
  "schema": {
    "title": "Activity",
    "type": "object",
    "required": [
      "title"
    ],
    "properties": {
      "title": {
        "type": "string",
        "title": "Title"
      },
      "description": {
        "type": "string",
        "title": "Description"
      }
    }
  }
}
**Describe the bug** When using data files of type `yaml` in FrontMatter v9.4.0 and trying to enter data entries in the [Data File View](https://frontmatter.codes/docs/datafiles-view#data-files-view) of the Dashboard, a given entry is not written to the (already existing, but empty) `yaml` file, although there is this little "pop-up window" shown in the top-right corner "Updated your data entries". On the contrary, when I prefill in data in the `yaml` file manually, that data entry is listed in the Data File View, but adding new entries from FrontMatter's dashboard is still not possible. >Note: Writing data entries works as expected in case of `json` data files. **To Reproduce** Steps to reproduce the behavior: 1. reproduce the data file definition as listed in section [Additional context](#additional-context) 2. create an empty `activities.yaml` file in the project root 3. get to the Data File View of the FrontMatter dashboard 4. select "Activitities" in column "Select your data type" 5. enter same sample data in the `Title` edit box on the right 6. click the `Add` button 7. "Updated your data entries" appears on the top-right 8. "Your activities data items" column remains empty, just showing "No activities data entries found" **Expected behavior** The data entry is written to the specified data file and shown in the Data File View. **Additional context** Data file definition in `.frontmatter/config/data/files` named `activities.json` (using the [Splitting your settings in multiple files](https://frontmatter.codes/docs/settings#splitting-your-settings-in-multiple-files) feature): ```json { "$schema": "https://frontmatter.codes/config/data.files.schema.json", "id": "activities", "title": "Activities", "file": "[[workspace]]/activities.yaml", "fileType": "yaml", "singleEntry": false, "labelField": "title", "schema": { "title": "Activity", "type": "object", "required": [ "title" ], "properties": { "title": { "type": "string", "title": "Title" }, "description": { "type": "string", "title": "Description" } } } } ``` <!-- github-sync-id:2102116845 -->
adam closed this issue 2026-10-05 02:54:39 +02:00
Author
Owner

Thanks, @pauko, for opening the issue. Found the issue, it had to do with an updated dependency and a function which was removed. I've implemented a fix in the beta and you should be able to test it out once released.

Thanks, @pauko, for opening the issue. Found the issue, it had to do with an updated dependency and a function which was removed. I've implemented a fix in the beta and you should be able to test it out once released. <!-- github-comment-id:1912275248 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#590