-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
When writing a new post, changing locale will cause an uncaught type error and the editing form of the post content isn't show up.
To Reproduce
- Setup Netify CMS with i18n enabled.
- Click New button in the index page.
- Change writing locale dropdown from
Writing in ENto another locale, for example,Writing in FR - The editing form will disappear, and you will see an uncaught type error in the debug console.
Expected behavior
- No error will be thrown.
- The editing form won't disappear after changing the writing locale.
Screenshots
Applicable Versions:
- Netlify CMS version:
2.*.* - Git provider: Self-hosted Gitlab
- OS: MacOS
- Browser version: chrome 99
CMS configuration
config.yaml
backend:
name: gitlab
repo: alvin/static-api-testbed # Path to your GitLab repository
auth_type: pkce # Required for pkce
app_id: #masked
api_root: #masked
base_url: #masked
auth_endpoint: oauth/authorize
publish_mode: editorial_workflow
media_folder: "static/images/uploads"
public_folder: "static/images/uploads"
i18n:
locales:
- en
- fr
structure: "multiple_files"
default_locale: en
collections:
- name: "announcement" # Used in routes, e.g., /admin/collections/blog
label: "Announcement" # Used in the UI
i18n: true
folder: "content/announcement" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
slug: "{{year}}{{month}}{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
fields: # The fields for each document, usually in front matter
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Featured Image", name: "thumbnail", widget: "image"}
- {label: "Rating (scale of 1-5)", name: "rating", widget: "number"}
- {label: "Body", name: "body", widget: "markdown"}index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Manager</title>
</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
<script src="https://unpkg.com/netlify-cms@^2.10.187/dist/netlify-cms.js"></script>
</body>
</html>Additional context
