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

Auto-create of languages collection will always result in 500 response #20510

Closed
johannes-richter opened this issue Nov 23, 2023 · 0 comments · Fixed by #22409
Closed

Auto-create of languages collection will always result in 500 response #20510

johannes-richter opened this issue Nov 23, 2023 · 0 comments · Fixed by #22409
Assignees
Labels

Comments

@johannes-richter
Copy link

Describe the Bug

Hi Directus team,

Adding a translations field to any collection will always result in Directus automatically creating a new "languages" collection and in another request try to fill that with preset items, like the following:

[ { "code": "en-US", "name": "English", "direction": "ltr" }, { "code": "ar-SA", "name": "Arabic", "direction": "rtl" }, { "code": "de-DE", "name": "German", "direction": "ltr" }, { "code": "fr-FR", "name": "French", "direction": "ltr" }, { "code": "ru-RU", "name": "Russian", "direction": "ltr" }, { "code": "es-ES", "name": "Spanish", "direction": "ltr" }, { "code": "it-IT", "name": "Italian", "direction": "ltr" }, { "code": "pt-BR", "name": "Portuguese", "direction": "ltr" } ]
That is very kind of Directus, but I have my own Languages collection already. And the internal /collections call as well as the /fields call will come back as 500 anyways. The thing is: Receiving the message inside the GUI is quite confusing because one expects there was something wrong creating a new translations field (which is not the case)
Maybe there should be an option to disable this feature. Thanks!

To Reproduce

You should have your own languages collection

  1. Create a new collection
  2. Create a new field and use the "translations" Schema > Set your own Languages collection, Language Indicator and Language direction fields > save
    => Use the dev tools to inspect what is going on

Directus Version

v10.8.1

Hosting Strategy

Self-Hosted (Docker Image)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants