Updated: Comment #N

Problem/Motivation

While refactoring getAdminRouteInfo() I noticed it was used in Drupal\comment\Controller\AdminController::bundleInfo(). When I went to manually test my changes, I got an access denied (as user 1!), only then noticing the _access: 'FALSE' in the routing definition.

It turns out that this route only exists for Field UI to attach itself to, and is not used. It could be a nice place to list the comment bundles, but a UI was never designed.

Proposed resolution

Let's not maintain dead code.

Remaining tasks

N/A

User interface changes

N/A, unless your were altering the route info yourself :)

API changes

N/A

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

Assuming green

Status: Reviewed & tested by the community » Needs work

The last submitted patch, comment-bundle-info.patch, failed testing.

The last submitted patch, comment-bundle-info.patch, failed testing.

larowlan’s picture

Status: Needs work » Needs review

comment-bundle-info.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, comment-bundle-info.patch, failed testing.

The last submitted patch, comment-bundle-info.patch, failed testing.

effulgentsia’s picture

Status: Needs work » Needs review
FileSize
3.54 KB

I got tripped up on this today as well. Here's an updated patch.

effulgentsia’s picture

Issue tags: +beta target

Tagging this as a beta target, because it's needed as a step to get rid of CommentBundleEnhancer and comment.module's unnecessary use of those request attributes, which is part of #2124749: [meta] Stop using $request->attributes->get(MAGIC_KEY) as a public API.

andypost’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#2230177: Without Field UI comment module presents a poor UX

This route was originally supposed to provide information about usage of comment bundle.
But later someone decided that it useless so let's get rid of it.

To remove CommentBundleEnhancer I think better way to introduce a new config entity to be used as bundle for comments, but this could lead to some performance regressions

+++ b/core/modules/comment/comment.routing.yml
@@ -74,11 +74,9 @@ comment.bundle_list:
+# This route is only used by Field UI.

only needed for Field UI

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

  • Commit d5c9621 on 8.x by catch:
    Issue #2141523 by effulgentsia, tim.plunkett: Comment's comment.bundle...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.