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

Unable to delete field #8655

Closed
3 tasks done
ghost opened this issue Oct 8, 2021 · 4 comments · Fixed by #8707
Closed
3 tasks done

Unable to delete field #8655

ghost opened this issue Oct 8, 2021 · 4 comments · Fixed by #8707

Comments

@ghost
Copy link

ghost commented Oct 8, 2021

Preflight Checklist

Describe the Bug

Unable to delete a field. Trying to delete field, cause following error message:

[INTERNAL_SERVER_ERROR] update `directus_fields` set `group` = NULL where `group` = 2 - ER_TRUNCATED_WRONG_VALUE: Truncated incorrect DOUBLE value: 'test'

I suppose that endpoint to delete field continue to refer to numeric group id instead group name after update since rc95.

To Reproduce

Create a field, after that try to delete field

What version of Directus are you using?

v9.0.0-rc.96 and v9.0.0-rc.95

What version of Node.js are you using?

v16.10.0

What database are you using?

8.0.26 - MySQL

What browser are you using?

Safari

What operating system are you using?

Ubuntu 20.04

How are you deploying Directus?

Locally

@flayks
Copy link

flayks commented Oct 8, 2021

Experiencing the same issue with MariaDB. Not really sure where this could come from but as for some context and testing:

  1. When moving all my fields from all the groups I have, I can remove any field again
  2. When adding a field to a group again, the error comes back
  3. Removing all my groups from everywhere, it works again. Then when creating a new group and putting a field (new or existing) inside it: same error

@rijkvanzanten
Copy link
Member

This is the offending call:

await trx('directus_fields').update({ group: null }).where({ group: metaRow.id });

That should be "where group = x and collection = y" instead of "where group = id"

@arladmin
Copy link

arladmin commented Oct 22, 2021

I'm unable to delete a field as well.

Directus v9.0.0-rc.99
DB: Postgres

Error:

  "errors": [
    {
      "message": "update \"directus_fields\" set \"group\" = $1 where \"group\" = $2 and \"collection\" = $3 - invalid input syntax for type integer: \"subject\"",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR"
      }
    }
  ]
}

@joselcvarela
Copy link
Member

Hello @arladmin,
Do you mind to open a new issue? Your issue seems to be slightly different from the original one.

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

Successfully merging a pull request may close this issue.

5 participants