Failed to persist entry: API_ERROR: "params.entry.raw"

Hi everyone,

I receive the error mentioned in the topic, when I try to publish a page with NetlifyCMS.

It is a somewhat long and complicated collection structure because of our needs. But, I can see the admin page and add content in all collections except the last two: pages and sayfalar.

Here is the relevant part (pages collection) of config.yml

  - name: "pages"
    label: "Pages (English)"
    files:
      - name: home
        label: Home Page
        file: /content/index.mdx
        delete: false
        fields:
          - widget: hidden
            name: lang
            label: Language
            default: en
            required: true
          - widget: hidden
            name: templateKey
            label: Template Key
            default: index-page
            required: true
          - widget: hidden
            name: slug
            label: Slug
            default: "index"
          - widget: image
            name: logo
            label: Logo
            required: true
            hint: "Recommended size: max width=256px, max height=64px"
          - widget: image
            name: favicon
            label: Favicon
            required: true
            hint: "180x180 recommended"
          - widget: image
            name: maskicon
            label: Safari Mask Icon
            required: false
            hint: "Square, black, SVG"
          - widget: object
            name: banner
            fields:
              - widget: string
                name: title
                label: Title
                required: true
                hint: "E.g.: Serving the legal needs of clients across the region."
              - widget: text
                name: subtitle
                label: Subtitle
                required: true
              - widget: image
                name: bannerimage
                label: Top Image
                required: true
                hint: "This image will be shown at the top of homepage."
          - widget: object
            name: intro
            fields:
              - widget: string
                name: introtitle
                label: Intro Title
                required: true
                default: About Kesikli
                hint: A title for intro such as "About Us" or "Expertise & Experience"
              - widget: markdown
                name: introduction
                label: Introduction
                required: true
                hint: Introduction. Pitch what makes you difference or what you can do for clients.
          - widget: object
            name: calltoaction
            fields:
              - widget: image
                name: ctaimage
                label: Call to action background image
                required: true
              - widget: string
                name: ctaline
                label: Call to Action
                hint: "Schedule a meeting with our attorneys"
                required: true
      - file: "content/about/index.mdx"
        label: "About"
        name: "about"
        fields:
          - widget: hidden
            name: lang
            label: Language
            default: en
            required: true
          - {
              label: "Template Key",
              name: "templateKey",
              widget: "hidden",
              default: "about-page",
            }
          - { label: "Title", name: "title", widget: "string" }
          - { label: "Body", name: "body", widget: "markdown" }

What I tried:

  • added folder: content to pages
  • removed / from the file value.
  • added format: “frontmatter”

Neither did work.

Any help is appreciated as always. Thanks!

Any thoughts? I’m stuck and open to suggestions.

Figured it out. It is about file format. The collections that were working fine were folder collections, and had these lines:

extension: mdx
format: "frontmatter"

So, I added the same lines to Pages collection, under label identifier. It looks like this now:

- name: "pages"
  label: "Pages (English)"
  extension: mdx
  format: frontmatter