M2M relational interface shows "not configured properly" for Administrator on a freshly-created, correctly-configured relation
Describe the Bug
Every M2M field in our project shows "The relationship is not configured properly or you don't have permission to access it" in the item edit form, for an account with admin_access: true. The admin app makes zero network requests when rendering the field and the failure happens client-side before any API call, unlike a normal 403.
This reproduces on two independent, unrelated M2M fields on the same collection (case_studies.tags and case_studies.authors - different junction tables, different related collections), so it isn't specific to one relation's configuration.
We fully tore down and rebuilt one of the two fields from scratch (deleted the field, deleted the junction collection, recreated the junction collection + both relation rows with meta.junction_field explicitly set from the start + recreated the alias field) and the brand-new relation fails identically and immediately. A corresponding M2O field (category) on the same collection, same form, renders and functions correctly.
To Reproduce
- Self-hosted Directus 12.3.1, PostgreSQL, no custom extensions installed (confirmed via GET /extensions → [])
- As an Administrator (confirmed via GET /users/me?fields[]=policies.policy.admin_access → true, and confirmed zero rows in directus_permissions for that policy on the relevant collections, as expected for admin bypass), open any item with an M2M field
- The field shows the error instead of the picker, with no attempt to fetch related data (checked via browser Network tab / devtools)
We verified via the REST API directly (bypassing the admin app) that:
- Both relation rows for the M2M (directus_relations) are present and correct, including junction_field
- GET /fields// returns correct special: ["m2m"], interface: "list-m2m" metadata
- A deep filter query (fields=.<related_id_field>.) resolves correctly server-side and returns real joined data
- Both tags/authors and their junction collections are properly registered in directus_collections
None of the following changed the outcome: hard browser refresh, testing in a completely fresh/never-used browser, logging out and back in, POST /utils/cache/clear, restarting the Directus pod/process, or rebuilding the relation entirely from scratch.
Expected behavior
The M2M field should render its picker normally for an Administrator account with a correctly-configured relation, as it does for other field types (M2O) on the same form.
Directus Version
12.3.1
Hosting Strategy
Self-Hosted (Docker Image)
Database
PostgreSQL
Source: directus/directus