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

Collection field requests 'misconfigured', asks that I select a collection #16954

Closed
conorhub opened this issue Dec 29, 2022 · 9 comments
Closed

Comments

@conorhub
Copy link

Describe the Bug

I have a m2o and m2m field in a collection working fine until I opened a new item in the UI today and see them both state "This relationship hasn't been configured properly".

If I go into the data model options of the UI, the interface option for these 2 fields (collection_tagging and collection_user) both state "The collection field is misconfigured" and, above that, "select a collection".

Problem

But I don't see any means to select a collection?

Question

If someone could please advise on how to correct the field, or is this beyond something that can be configured and I need a new collection from scratch to ensure the configuration is appropriate? As an aside, how did I manage to make a working field become a misconfigured one without having changed any data model options since it was working last?

Possibilities

Is it possible to change the configuration of a relational collection just by altering the items in it? I've been trying to update the collections via the API before this message appeared and fear I may have caused this by this method.

To Reproduce

I can't say for sure exactly what I did but I had presumed I could update the nested items of a field in much the same way as the UI does just by saying "I don't want the one with this id any more" but it appears I need to use detective work to fetch the id of the junction collection first and target the id of the item in the junction collection.

Errors Shown

No response

What version of Directus are you using?

9.18.1

What version of Node.js are you using?

16.17.0

What database are you using?

MySQL 8

What browser are you using?

Firefox

How are you deploying Directus?

Docker on remote server

@github-actions
Copy link

Linear: ENG-362

@conorhub
Copy link
Author

Some of my question may relate to #11846 but I'm not specifically looking for how to use interface options. And it was hard to ascertain if the final reply was suggesting everything was performing as expected or confirming a bug.

@br41nslug
Copy link
Member

Could you share the data-model configuration the for the field that is erroring? specifically the "relationship" tab
I believe the circled setting should be the "collection" it is referring to.
image

@conorhub
Copy link
Author

I don't understand how, but both relational fields are operating fine now again, just hours after. I haven't reset anything or altered any fields. All I've done is re-enabled then disabled again the 'enable create button' in the Fields tab for one of the fields.

There was no Relationship tab available to select during the time it said it was misconfigured. it's appeared back again and is showing how I originally configured it:

Screenshot 2022-12-29 at 15 45 38

@paescuj
Copy link
Member

paescuj commented Feb 6, 2023

Is it possible to change the configuration of a relational collection just by altering the items in it? I've been trying to update the collections via the API before this message appeared and fear I may have caused this by this method.

Just to make sure: By "update the collections via the API" do you mean only the items (see items API reference) or effectively the collection itself (e.g. fields or relations)?

@wc-matteo
Copy link
Contributor

same issue. After restarting the directus container, it works normally. Maybe something related to cache?

@paescuj
Copy link
Member

paescuj commented Feb 6, 2023

same issue. After restarting the directus container, it works normally. Maybe something related to cache?

Do you know how you were running into this issue or do you have some additional info which would help to reproduce it?

@wc-matteo
Copy link
Contributor

I created a m2m relationship using create field in advanced mode. Then:

If I go into the data model options of the UI, the interface option state "The collection field is misconfigured" and, above that, "select a collection".

the interface in the collection wasn't working either.

on directus v9.22.4 / postgres 15.1 / docker

@paescuj
Copy link
Member

paescuj commented Feb 7, 2023

Thanks @wc-matteo! However, I'm still not able to reproduce this issue based on the given information, so I'll close this for now. Happy to keep discussing in this thread, and we'll reopen once more information becomes available 👍🏻

@paescuj paescuj closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 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
None yet
Projects
None yet
Development

No branches or pull requests

4 participants