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

Corresponding Field is not working for system collections "directus_files" #17376

Closed
ncxx23 opened this issue Feb 2, 2023 · 4 comments · Fixed by #17392
Closed

Corresponding Field is not working for system collections "directus_files" #17376

ncxx23 opened this issue Feb 2, 2023 · 4 comments · Fixed by #17392
Assignees
Labels

Comments

@ncxx23
Copy link

ncxx23 commented Feb 2, 2023

Describe the Bug

I try to create "Multiple Files" relation field and set up corresponding field (m2m) in directus_files collection
Screenshot 2023-02-02 at 14 56 17

Screenshot 2023-02-02 at 14 56 33

This field is created but if you open that corresponding field you see it is don't have any relations and look corrupted.
Screenshot 2023-02-02 at 14 56 57 and after this moment any action with directus_files causes an error, and the current files are no longer available (they visible but show error when you click on it)

To Reproduce

Create "Multiple files" field with corresponding m2m field.

Errors Shown

{
  "errors": [
    {
      "message": "select \"directus_files\".\"id\", \"directus_files\".\"storage\", \"directus_files\".\"filename_disk\", \"directus_files\".\"filename_download\", \"directus_files\".\"title\", \"directus_files\".\"type\", \"directus_files\".\"folder\", \"directus_files\".\"uploaded_by\", \"directus_files\".\"uploaded_on\", \"directus_files\".\"modified_by\", \"directus_files\".\"modified_on\", \"directus_files\".\"charset\", \"directus_files\".\"filesize\", \"directus_files\".\"width\", \"directus_files\".\"height\", \"directus_files\".\"duration\", \"directus_files\".\"embed\", \"directus_files\".\"description\", \"directus_files\".\"location\", \"directus_files\".\"tags\", \"directus_files\".\"metadata\", \"directus_files\".\"candidates_test\" from \"directus_files\" where \"directus_files\".\"id\" = $1 order by \"directus_files\".\"id\" asc limit $2 - column directus_files.candidates_test does not exist",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR"
      }
    }
  ]
}

Screenshot 2023-02-02 at 14 57 15

What version of Directus are you using?

9.22.4

What version of Node.js are you using?

18.13.0

What database are you using?

Postgres: 15.1

What browser are you using?

Crome

How are you deploying Directus?

Docker

@github-actions
Copy link

github-actions bot commented Feb 2, 2023

Linear: ENG-627

@ponanin
Copy link

ponanin commented Feb 3, 2023

I can confirm, reproduced, version 9.22.3 in Docker

@ncxx23
Copy link
Author

ncxx23 commented Feb 3, 2023

Do you have permissions configured so that you can't edit the directus_files collection or something similar?

Yeah, I have full permissions (admin role), I can create fields in system collections.
Creating the "Multiple Files" field does not even offer a choice of collection, it automatically creates a link to that system collection "directus_files"
I tried to reproduce this bug on 3 different directus instances - it reproduces everywhere.

Screen.Recording.2023-02-03.mov

@Nitwel
Copy link
Member

Nitwel commented Feb 3, 2023

Yea, I overlooked that you wrote that the error occurs when interacting with it. I read it as it would error on creating. 👍

@Nitwel Nitwel added App and removed API labels Feb 3, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants