Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files config results in an error #49

Closed
ghostdevv opened this issue Sep 1, 2023 · 3 comments
Closed

Files config results in an error #49

ghostdevv opened this issue Sep 1, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ghostdevv
Copy link

Here is the config:

media_folder: "static/uploads/images"
public_folder: "/uploads"
publish_mode: editorial_workflow

collections:
  - label: "Pages"
    name: "pages"
    files:
      - label: "Requests"
        name: "requests"
        file: "src/content/requests.json"
        fields:
          - { label: "Title", name: "title", widget: "string" }

Seems like the error is coming from here with otherNames receiving [undefined].

const dupName = otherNames.sort().findLast((p) => p.match(regex));

The exact error message is:
image

@kyoshino
Copy link
Member

kyoshino commented Sep 2, 2023

Thanks for the report! I’m able to replicate the issue and now trying to solve it. The fix should be coming shortly.

@kyoshino
Copy link
Member

kyoshino commented Sep 2, 2023

The fix is in! I couldn’t catch it earlier because it only happened when the i18n support wasn’t used, while all my clients use i18n. I’ll be adding automated tests to avoid this kind of problem later this year.

@kyoshino kyoshino self-assigned this Sep 2, 2023
@kyoshino kyoshino added the bug Something isn't working label Sep 2, 2023
@ghostdevv
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants