StaticJsCMS / static-cms

A Git-based CMS for Static Site Generators
https://staticjscms.netlify.app/
MIT License
590 stars 53 forks source link

[duplicate] TypeError: Cannot destructure property 'decorations' of 'o' as it is undefined. #391

Closed Skrubbadubba closed 1 year ago

Skrubbadubba commented 1 year ago

Describe the bug This error appears when clicking on any entry in the UI. The rest of the UI works fine

I have had some weird problems with gitlabs API before - some particular files weren't retrievable. I pinpointed it being because those files had Swedish characters in their name (which to me is still a bug but that's beside the point). After I removed the characters and gitlabs API worked without problems, I thought this bug would also go away, but it did not

To Reproduce Click on an entry from any collection on my CMS.

Unfortunately, I don't know a way to be more specific. Although I can show my repo: https://gitlab.liu.se/Kodvet/sektionshemsidan. The repo is public, so maybe the CMS is accessible but read-only?? I'm guessing not but if so, it's at sektionshemsidan.netlify.app/admin

I can consult with my team regarding possibly inviting you to our gitlab-team to give access to the CMS.

Expected behavior The editor UI is shown.

Screenshots image

Applicable Versions:

CMS configuration


backend:
  name: gitlab
  repo: Kodvet/sektionshemsidan
  auth_type: pkce
  app_id: 1fd03c5ff044c3a3abff03589e28d67bce9b3ccb0ff2ad39764fd46e4dbf0c38
  api_root: https://gitlab.liu.se/api/v4
  base_url: https://gitlab.liu.se/
  auth_endpoint: oauth/authorize
  branch: main
local_backend: false
logo_url: https://sektionshemsidan.netlify.app/images/Sektionslogga 1.png
display_url: http://localhost:3000/
media_folder: /static/images
public_folder: /images
locale: sv
collections:
  - name: nyheter
    label: Nyheter
    label_singular: nyhet
    folder: src/data/nyheter
    create: true
    slug: "{{year}}{{month}}{{day}}{{hour}}{{minute}}{{second}}"
    icon: newspaper
    view_filters:
      - label: Utkast
        field: draft
        pattern: "true"
        id: draft__true
      - label: Publicerade
        field: draft
        pattern: "false"
        id: draft__false
    view_groups:
      - label: Månad publicerad
        field: date
        pattern: "[a-zA-Z]+"
        id: date__[a-zA-Z]+
      - label: Författare
        field: author
        id: author__undefined
    editor:
      preview: false
    fields:
      - label: Utkast?
        name: draft
        widget: boolean
      - label: Författare
        name: author
        widget: relation
        collection: medlemmar
        value_field: namn
        search_fields:
          - namn
          - post
          - utskott
      - label: Rubrik
        name: title
        widget: string
        required: true
      - label: Datum
        name: date
        widget: datetime
        date_format: dd-MM-yyyy
        time_format: false
        format: dd-MMMM-yyyy
      - label: Omslagsbild
        name: img
        widget: image
        required: false
      - label: Utdrag
        name: excerpt
        widget: text
        required: true
        hint: Detta är det som står på startsidans nyhetsflöden. Du behöver inte komma
          på nåt speciellt. Förslagsvis kan du copy pastea 3 första meningarna
          från inlägget
      - label: Inlägget
        name: body
        widget: markdown
        required: true
    sortable_fields:
      fields:
        - commit_date
        - title
        - date
        - commit_author
  - name: medlemmar
    identifier_field: namn
    label: Medlemmar
    label_singular: Medlem
    folder: src/data/medlemmar
    icon: usergroup
    create: true
    slug: "{{year}}{{month}}{{day}}{{hour}}{{minute}}{{second}}"
    editor:
      preview: false
    view_groups:
      - label: Utskott
        field: utskott
        id: utskott__undefined
    fields:
      - label: Namn
        name: namn
        widget: string
      - labek: Utskott
        name: utskott
        widget: relation
        collection: utskott
        value_field: title
        search_fields:
          - title
      - label: Post
        name: post
        widget: string
      - label: Kogvet mail
        name: kontakt
        widget: string
      - label: Bild
        name: bild
        widget: image
        media_library:
          choose_url: true
      - label: Om mig
        name: body
        widget: markdown
        required: false
        hint: (Ni får själv velja om detta ska vara obligatoriskt) Skriv lite om dig
          själv, varförd du valde kogvet, linköping. Varför du sökte till din
          post. Eller bara något roligt, fan vet jag
    sortable_fields:
      fields:
        - commit_date
        - namn
        - commit_author
    view_filters: []
  - name: utskott
    label: Utskott
    folder: src/data/utskott
    icon: userrectangle
    slug: "{{year}}{{month}}{{day}}{{hour}}{{minute}}{{second}}"
    create: true
    editor:
      sortable_
...
Skrubbadubba commented 1 year ago

I'm sorry, This is a duplicate. I forgot to check beforehand 😟. I'll keep it open in case I can't get it fixed.