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
414 stars 65 forks source link

Collection with comments not editable via content-type builder #67

Closed alexey13 closed 3 years ago

alexey13 commented 3 years ago

Strapi version: 3.6.3. How to reproduce: add field to collection with comments, click 'save', see in console: contentType.attributes.comments.nature": Array [ "must be one of the following values: oneWay, manyWay, oneToOne, oneToMany, manyToOne, manyToMany" ] ​​​ Screenshot 2021-08-18 at 13-25-45 Strapi - Content Type Builder

cyp3rius commented 3 years ago

Hello @alexey13 ,

As you've already provided a "comments" field to your model by editing JSON schema it's not possible to manage it via the builder interface. That's because field got a polymorphic relation set, which is not supported by Strapi Admin UI.

alexey13 commented 3 years ago

I mean error appear if you try to add new fields to collection with comments. For example we have "Books" collection. Added "Comments". If we will try to add any new field to "Books" collection we will get an error.

alexey13 commented 3 years ago

So, if we added "comments" to collection we cant edit collection(add, delete fields) via content type builder, right? Just to understand

cyp3rius commented 3 years ago

Yep, that's all related to what I wrote above. As a collection has "comments" field already added by editing JSON, all next fields need to be added by the same way.

See #59 and #62 as reference, even if error is different all is about the same.

alexey13 commented 3 years ago

Thank you!