decaporg / decaporg/decap-cms

i18n - single_file error

Open
#6,353 5 comments 0 reactions 1 assignee Claimed by @VISHESH0932 View on GitHub
area: i18n type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**
I have setup i18n in a single_file, need to test some feature, but I'll need a specific setup, but I encounter an issue while testing that.
Folder collection does work very good, but when I'm trying to save a single_file, I got the following error.
```javascript
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'get')
```

**Screenshots**
https://user-images.githubusercontent.com/23478544/160468575-5aa9e718-b27c-4a9f-8f1c-e74785a7fe5f.mp4

**Applicable Versions:**
I'm using the `unpkg link` and 11ty as SSG

- Netlify CMS version: https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js
- Git provider: GitHub and local_backend

**CMS configuration**
```yml
backend:
...
squash_merges: true

local_backend:
url: http://localhost:8089/api/v1

publish_mode: editorial_workflow

media_folder: 'packages/_data/images'

i18n:
structure: single_file
locales: [en, fr, de]
default_locale: en

collections:
- name: 'pages'
label: 'Pages'
i18n:
structure: single_file
files:
- name: 'about'
label: 'About Page'
file: packages/_data/pages/about.yml
i18n: true
fields:
- { label: 'Title', name: 'title', widget: 'string', i18n: true }
```

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.