Skip to content

Fix Moderate Comments control panel visibility based on Discussion Support addon installation#7878

Merged
davisagli merged 3 commits intoplone:mainfrom
Kathrina-dev:bugfix-moderate-comments-view
Feb 24, 2026
Merged

Fix Moderate Comments control panel visibility based on Discussion Support addon installation#7878
davisagli merged 3 commits intoplone:mainfrom
Kathrina-dev:bugfix-moderate-comments-view

Conversation

@Kathrina-dev
Copy link
Copy Markdown
Member

This PR fixes the visibility of the Moderate Comments control panel in Volto to conditionally render only in the presence of the "Discussion" control from "Discussion Support" addon.

What changed

  • The Moderate Comments link is now shown only if the backend exposes the "Discussion Support" addon is installed by the user
  • The Controlpanels.test.jsx now accomodates changes in the control panel to reflect the new behaviour.

Why

Previously, the Moderate Comments control panel was rendered in the frontend by default, even when plone.app.discussion was not installed. In those cases, the backend returned empty data, resulting in an empty or misleading UI.



Closes #7786


Notes

  • No additional API calls are introduced
  • No assumptions are made about add-on installation
  • This change conditionally exposes the link based on backend-provided control panels, avoiding permission issues and incorrect visibility.

@Kathrina-dev
Copy link
Copy Markdown
Member Author

@davisagli please review the changes I've made, it solves the bug issue #7786

Copy link
Copy Markdown
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works as expected. Thank you!

@davisagli davisagli merged commit 2e7b574 into plone:main Feb 24, 2026
43 checks passed
@Kathrina-dev Kathrina-dev deleted the bugfix-moderate-comments-view branch March 13, 2026 18:22
sneridagh added a commit that referenced this pull request Mar 19, 2026
* main: (122 commits)
  Release 19.0.0-alpha.27
  Release @plone/slate 19.0.0-alpha.12
  Release @plone/razzle 1.0.0-alpha.1
  We do not release @plone/client from here
  Handle create-user 500 responses where body contains 'message' instead of 'error' (#7946)
  Dropzone filewidget a11y (#7956)
  Update css-minimizer-webpack-plugin to v7 and keep razzleOptions.enableSourceMaps control (#7934)
  Refactor Password Reset: Convert Class-Based Component to Functional Component (#7697)
  fix: Fixed searchable types in Object Browser Widget, adding also sel… (#7942)
  Fix in-page drag-and-drop for the Listing block in Volto 18 and 19 (#7907)
  Improved docs of Plone REST API JavaScript Client (#5576)
  Fix Moderate Comments control panel visibility based on Discussion Support addon installation (#7878)
  fix: Add authorization error handling to control panels (#7807)
  Fix subordering order tab (#7937) (#7939)
  Fix converting value to html in HtmlSlateWidget (#7938)
  razzle.config.js: Fix defaultPlugins missing name property to enable addon SCSS plugin replacement (#7908)
  Update users controlpanel to work with new response format (#7895)
  Avoid storing blocksClipboard in localstorage until it has a value (#7925)
  Remove link to Jobfamilie MEDICE: site is no longer a Volto site (redirects to non-Volto destination) (#7929)
  Exclude `.storybook` from ESLint's default hidden directory ignore list via `.eslintignore` to allow linting of Storybook configuration files (#7898)
  ...
davisagli pushed a commit to Manik-Khajuria-5/volto that referenced this pull request May 4, 2026
…pport addon installation (plone#7878)

Co-authored-by: Plone <plone@Kattylaptop.localdomain>
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

Successfully merging this pull request may close these issues.

Moderate Comments control panel should not be visible if plone.app.discussion is not installed

2 participants