decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.84k stars 3.04k forks source link

RangeError: Use `d` instead of `D` (in `ddd, MMM D, YYYY`) for formatting days of the month to th... #6832

Closed ashwani1218 closed 1 year ago

ashwani1218 commented 1 year ago

Describe the bug

To Reproduce Deploy the Hugo template site, set up the admin password, and check the blog post without changing anything.

Expected behavior The generated MD file should be displayed with the preview of the blog.

Screenshots

image

Applicable Versions:

CMS configuration


backend:
  name: git-gateway
media_folder: site/static/img
public_folder: img
collections:
  - name: post
    label: Post
    folder: site/content/post
    create: true
    fields:
      - label: Title
        name: title
        widget: string
      - label: Publish Date
        name: date
        widget: datetime
      - label: Intro Blurb
        name: description
        widget: text
      - label: Image
        name: image
        widget: image
        required: false
      - label: Body
        name: body
        widget: markdown
    publish: true
    type: folder_based_collection
    sortable_fields:
      - commit_date
      - title
      - date
      - commit_author
      - description
    view_filters: []
    view_groups: []
  - name: pages
    label: Pages
    files:
      - file: site/content/_index.md
        label: Home Page
        name: home
        fields:
          - label: Title
            name: title
            widget: string
          - label: Subtitle
            name: subtitle
            widget: string
          - label: Image
            name: image
            widget: image
          - label: Blurb
            name: blurb
            widget: object
            fields:
              - label: Heading
                name: heading
                widget: string
              - label: Text
                name: text
                widget: text
          - label: Intro
            name: intro
            widget: object
            fields:
              - label: Heading
                name: heading
                widget: string
              - label: Text
                name: text
                widget: text
          - label: Products
            name: products
            widget: list
            fields:
              - label: Image
                name: image
                widget: image
              - label: Text
                name: text
                widget: text
          - label: Values
            name: values
            widget: object
            fields:
              - label: Heading
                name: heading
                widget: string
              - label: Text
                name: text
                widget: text
      - file: site/content/contact/_index.md
        label: Contact Page
        name: contact
        fields:
          - label: Title
            name: title
            widget: string
          - label: Logo
            name: logo
            widget: image
          - label: Body
            name: body
            widget: markdown
          - label: Contact Entries
            name: contact_entries
            widget: list
            fields:
              - label: Heading
                name: heading
                widget: string
              - label: Text
                name: text
                widget: text
      - file: site/content/products/_index.md
        label: Products Page
        name: products
        fields:
          - label: Title
            name: title
            widget: string
          - label: Image
            name: image
            widget: image
          - label: Heading
            name: heading
            widget: string
          - label: Description
            name: description
            widget: string
          - label: Intro
            name: intro
            widget: object
            fields:
              - label: Heading
                name: heading
                widget: string
              - label: Description
                name: description
                widget: text
              - label: Blurbs
                name: blurbs
                widget: list

...
formicagreen commented 1 year ago

Having the same issue

martinjagodic commented 1 year ago

@tanyabouman you did some great work wit the template recently, did you maybe encounter this bug?

tanyabouman commented 1 year ago

No, I didn't have this problem, but that line looks similar to https://github.com/decaporg/one-click-hugo-cms/blob/54717c5612bd63bc8a99aa12018c3e2cc0d3db1c/src/js/cms-preview-templates/post.js#L12 It looks like this problem was solved on main (the default branch) in September 2022. https://github.com/decaporg/one-click-hugo-cms/pull/705/files#diff-393a7975bf3ed93fc757ba3b50ad191d9d9bc357b5e26ed69bec1ac07425fb15 However, the change didn't make it into master, which also exists, but has diverged from main. https://github.com/decaporg/one-click-hugo-cms/blob/master/src/js/cms-preview-templates/post.js#L12

martinjagodic commented 1 year ago

Thanks for this catch! @ashwani1218 and @formicagreen which branch did you use?

martinjagodic commented 1 year ago

This is solved in https://github.com/decaporg/one-click-hugo-cms/issues/777