Skip to content

Duplicate 'Comments' tab #406

@ntd

Description

@ntd

Module version(s) affected

5

Description

With a plain Silverstripe blog I get a double Comments tab on pages with CommentsExtension enabled. While the latter is added by CommentExtension::updateModerationFields, the former is just an empty tab. I think that is added by the scaffolding logic, although I don't understand why it does not show a GridField with all comments.

How to reproduce

Not sure what to put here. This is a basic Silverstripe 6 blog site configured in this way:

---
Name: resetcommentssitetree
After: commentssitetree
---
SilverStripe\CMS\Model\SiteTree:
  extensions:
    comments: null

---
Name: mycomments
After: resetcommentssitetree
---
SilverStripe\Comments\Controllers\CommentingController:
  extensions:
    - SilverStripe\SpamProtection\Extension\CommentSpamProtection
SilverStripe\Blog\Model\BlogPost:
  default_notification_template: SilverStripe\CommentNotifications\CommentEmail
  extensions:
    comments: SilverStripe\Comments\Extensions\CommentsExtension
SilverStripe\Blog\Model\BlogPostNotifications:
  notification_on_spam: false

---
Name: myantispam
Only:
  moduleexists:
    - silverstripe/spamprotection
---
SilverStripe\Comments\Controllers\CommentingController:
  extensions:
    - SilverStripe\SpamProtection\Extension\CommentSpamProtection

---
Name: myrecaptcha
Only:
  moduleexists: undefinedoffset/silverstripe-nocaptcha
---
SilverStripe\SpamProtection\Extension\FormSpamProtectionExtension:
  default_spam_protector: UndefinedOffset\NoCaptcha\Forms\NocaptchaProtector
UndefinedOffset\NoCaptcha\Forms\NocaptchaField:
  site_key: ...
  secret_key: ...
  recaptcha_version: 3

Possible Solution

No response

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions