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

Cannot add Collections to M2A-field #9715

Closed
3 tasks done
fabianbeiermeire opened this issue Nov 11, 2021 · 2 comments · Fixed by #9738
Closed
3 tasks done

Cannot add Collections to M2A-field #9715

fabianbeiermeire opened this issue Nov 11, 2021 · 2 comments · Fixed by #9738
Assignees
Labels
Milestone

Comments

@fabianbeiermeire
Copy link

Preflight Checklist

Describe the Bug

I have a Collection "Pages" with a M2A-Field called "Content". When I created the M2A-Field I added two related Collections ("Headline" and "Text"). When I save the Page (in "Pages") everything works fine. But when I add a 3rd Related Collection ("image") to the M2A and add the new Content-Item "Image" to a page I get following error:

Bildschirmfoto 2021-11-11 um 12 24 47

Bildschirmfoto 2021-11-11 um 12 21 10

My M2A Relations:
Bildschirmfoto 2021-11-11 um 12 24 20

I already found out that the Primary Key was not set, when adding the "Image"-Block

To Reproduce

Create a Collection with a M2A.
Add two item (Related Collections) to the M2A.
After initial saving of the M2A add more Related Collections to the M2A.

After that you cannot save the Collection with the M2A when an item was added that was later added.

Errors Shown

{ "message": "\"pages_content.item\" can't be linked to collection \"image", "extensions": { "code": "INVALID_PAYLOAD" } }

What version of Directus are you using?

9.0.0

What version of Node.js are you using?

v14.18.1

What database are you using?

SQLite 3.36.0

What browser are you using?

Brave (Chrome), Safari

What operating system are you using?

macOS

How are you deploying Directus?

running locally, Docker

@madc
Copy link

madc commented Nov 11, 2021

We see the same issue, I guess this is connected to #9182 (and #9315, #9438).

It seems, updates to M2A tables are not persisted. The app "remembers" the change and shows the new collection until a reload.

@fabianbeiermeire
Copy link
Author

It seems, updates to M2A tables are not persisted. The app "remembers" the change and shows the new collection until a reload.

I see. I only realised that when I was restarting the local server it was gone. But you are right. Its also gone just after a simple Page reload.

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.

4 participants