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

Incomplete Display of Related Items in M2M Relationship #22676

Open
FutureBuddha opened this issue Jun 5, 2024 · 0 comments
Open

Incomplete Display of Related Items in M2M Relationship #22676

FutureBuddha opened this issue Jun 5, 2024 · 0 comments
Labels

Comments

@FutureBuddha
Copy link

FutureBuddha commented Jun 5, 2024

Describe the Bug

I have encountered a bug in Directus involving two collections in my case these are: listings and attributes. In the listings collection, there is a many-to-many (M2M) relation to attributes.

Problem Details

  • When editing an existing listing with a non-admin account, only a small subset of related attributes is displayed, even though the system correctly finds all related items.
  • Using the search function reveals all related items, including those not initially displayed.
  • This issue only occurs when updating a listing. When creating a new listing, all attributes are displayed correctly.
  • The bug affects all non-admin accounts, even those with admin rights. The main admin account does not experience this issue.
  • The problem seems to be related to the number of items in the junction collection.

Screenshot_2024-06-04_11-01-56

If I create a new M2M (many-to-many) relation field, it works perfectly until I import data into the junction collection.

Collection Details

  • listings: 789 items
  • attributes: 123 items
  • Junction collection: 2303 items

Thank you for looking into this issue. Please let me know if you need any further information.

To Reproduce

  1. Create collections listings and attributes with the following fields:
    • listings: input field title
    • attributes: input field name
  2. Create a M2M relation in listings to attributes.
  3. Import data into listings and attributes.
  4. Import data into the junction collection.
  5. Log in with any account other than the main admin account.
  6. Update a listing and check the relation field.

listings-minial.csv

listings_attributes-junction-collection.csv

attributes-minimal.csv

Directus Version

v10.12.0

Hosting Strategy

Self-Hosted (Docker Image)

Database

PostgreSQL 16.3 on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit , postgis_version 1 3.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1, from https://neon.tech/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants