- Do you want to request a feature or report a bug?
A bug is what it seems to be ...
- What is the current behavior?
When trying to save an entry (workflow turned on), I am getting an error
Failed to persist entry: TypeError: e.replace is not a function
- If the current behavior is a bug, please provide the steps to reproduce.
I click new entry (blog) and after entering the fields, I click save
- What is the expected behavior?
It should save it.
- Please link or paste your config.yml below if applicable.
backend:
name: git-gateway
branch: master
publish_mode: editorial_workflow
media_folder: static/img
public_folder: /img
collections:
- name: "menuPages"
label: "Menu Pages"
folder: "src/pages/"
create: true
slug: "{{slug}}"
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Description", name: "description", widget: "text"}
- {label: Image, name: imagepath, widget: image, required: false}
- {label: "Body", name: "body", widget: "markdown"}
- name: "blog"
label: "Blog"
folder: "src/pages/blog/"
create: true
slug: {{slug}}
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Description", name: "seodescription", widget: "text"}
- {label: Image, name: imagepath, widget: image, required: false}
- {label: "Image Description", name: "imgdesc", widget: "text"}
- {label: "Body", name: "body", widget: "markdown"}
- {label: "Tags", name: "tags", widget: "list"}
- name: "settings"
label: "Settings"
create: true
files:
- name: "general"
label: "Site Settings"
file: "_data/settings.json"
description: "General Site Settings"
fields:
- {label: "Global title", name: "site_title", widget: "string"}
- label: "Post Settings"
name: posts
widget: "object"
fields:
- {label: "Number of posts on frontpage", name: front_limit, widget: number}
- {label: "Default Author", name: author, widget: string}
- {label: "Default Thumbnail", name: thumb, widget: image, class: "thumb"}
Can you try wrapping the "{{slug}}" in quotes for your blog collection (i.e.
slug: "{{slug}}")? Because of the curly brackets, it won't parse correctly unless it is quoted.
@tech4him1 thanks for your super quick reply! I will test it out and close this issue hopefully :)
Most helpful comment
Can you try wrapping the "{{slug}}" in quotes for your blog collection (i.e.
slug: "{{slug}}")? Because of the curly brackets, it won't parse correctly unless it is quoted.