Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: YAML Data files read but not written #743

Closed
pauko opened this issue Jan 26, 2024 · 1 comment
Closed

Issue: YAML Data files read but not written #743

pauko opened this issue Jan 26, 2024 · 1 comment
Labels
Projects

Comments

@pauko
Copy link

pauko commented Jan 26, 2024

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"
      }
    }
  }
}
@pauko pauko added the bug Something isn't working label Jan 26, 2024
@estruyf estruyf added this to To do in 10.0.0 via automation Jan 26, 2024
estruyf added a commit that referenced this issue Jan 26, 2024
@estruyf
Copy link
Owner

estruyf commented Jan 26, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants