VirtusLab-Open-Source / strapi-plugin-comments

A plugin for Strapi Headless CMS that provides end to end comments feature with their moderation panel, bad words filtering, abuse reporting and more.
MIT License
407 stars 63 forks source link

TypeError: Cannot read property 'id' of null #46

Closed dennis-hh closed 3 years ago

dennis-hh commented 3 years ago

Hello, we're trying to use this plugin, but opening a comment under the "Comments" collection types results in the error TypeError: Cannot read property 'id' of null (or TypeError: Cannot read property 'type' of undefined in newer versions of strapi). I know that the comment handling is done under Plugins>Comments, but this view should work nonetheless. Stack trace:

TypeError: Cannot read property 'type' of undefined
    at m (main.aae4b6a1.chunk.js:1)
    at Ka (main.aae4b6a1.chunk.js:1)
    at gl (main.aae4b6a1.chunk.js:1)
    at cs (main.aae4b6a1.chunk.js:1)
    at ls (main.aae4b6a1.chunk.js:1)
    at Xl (main.aae4b6a1.chunk.js:1)
    at main.aae4b6a1.chunk.js:1
    at t.unstable_runWithPriority (main.aae4b6a1.chunk.js:1)
    at Vo (main.aae4b6a1.chunk.js:1)
    at Yo (main.aae4b6a1.chunk.js:1)
cyp3rius commented 3 years ago

@dennis-hh unfortunatelly that is caused by polymorphic relation used for Comments entity. Strapi Content Manager is not handling this properly yet, and that something we depend on the Core. As a developers we are responsible only for the delivered plugin codebase and dedicated UI.

dennis-hh commented 3 years ago

Has this issue been raised with the Strapi core team already? We should let them know that this is an issue :).

cyp3rius commented 3 years ago

I’ve already highlight it within the commercial project we are doing :)