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

Editor.js field within M2A field gives error #32

Open
zachNDTC opened this issue Apr 6, 2022 · 1 comment
Open

Editor.js field within M2A field gives error #32

zachNDTC opened this issue Apr 6, 2022 · 1 comment

Comments

@zachNDTC
Copy link

zachNDTC commented Apr 6, 2022

Hello,
I have a collection named "courses" and a collection named "lessons." Within courses I have a M2A field I named "syllabus" to add lessons to each course item. I can add lessons and add titles to lessons just fine (input field). When I edit a lesson from within a course and try to use the Editor.js field, I am allowed to enter in all the content, but when I save, the panel goes blank.

When I first enter content, I get the following console error (though it does continue to let me add/edit new blocks):

vendor.ef99adf3.js:5 TypeError: Cannot create property 'content' on string '1'
    at Proxy.A (index.5bac3394.entry.js:43:73072)
    at onUpdate:modelValue (index.5bac3394.entry.js:43:75714)
    at Ph (vendor.ef99adf3.js:5:656)
    at W1 (vendor.ef99adf3.js:5:735)
    at nB (vendor.ef99adf3.js:2:21162)
    at h (index.5bac3394.entry.js:43:64094)
    at o.onUpdate:modelValue.$.<computed>.$.<computed> (index.5bac3394.entry.js:43:66546)
    at Ph (vendor.ef99adf3.js:5:656)
    at W1 (vendor.ef99adf3.js:5:735)
    at nB (vendor.ef99adf3.js:2:21162)

When I try to save, I get the following error:

vendor.ef99adf3.js:5 TypeError: Cannot read properties of undefined (reading 'endsWith')
    at index.5bac3394.entry.js:43:75647
    at Proxy.find (<anonymous>)
    at index.5bac3394.entry.js:43:75612
    at KB (vendor.ef99adf3.js:2:62802)
    at Proxy.lM (index.5bac3394.entry.js:43:74199)
    at v5 (vendor.ef99adf3.js:2:22303)
    at C3.pt [as fn] (vendor.ef99adf3.js:2:50749)
    at C3.run (vendor.ef99adf3.js:2:12019)
    at ut (vendor.ef99adf3.js:2:50415)
    at Oe (vendor.ef99adf3.js:2:50017)

Editor works perfectly fine when natively editing a lesson, but when editing a lesson from within a course, it breaks.

When editing within a course:
Screen Shot 2022-04-05 at 9 50 30 PM

After saving everything disappears:
Screen Shot 2022-04-05 at 9 50 36 PM

@dimitrov-adrian
Copy link
Owner

@zachNDTC Is it still reproducible? I tried Directus v9.10 and exact setup and creating new and updating existing content from many-to-any related field is working just fine.

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

No branches or pull requests

2 participants