Download & Extend

Provide node type/bundle in comment_entity_info()

Project:Drupal core
Version:7.x-dev
Component:comment.module
Category:task
Priority:normal
Assigned:sun
Status:closed (fixed)
Issue tags:needs backport to D7, Quick fix

Issue Summary

Copying from admin_menu.map.inc:

            // @todo Make Comment module expose the original node type bundle,
            //   pretty please.
            if (drupal_substr($bundle_name, 0, 13) == 'comment_node_') {
              $bundle_name = drupal_substr($bundle_name, 13);
            }
AttachmentSizeStatusTest resultOperations
drupal.comment-node-bundle.0.patch951 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal.comment-node-bundle.0.patch. See the log in the details link for more information.View details

Comments

#1

drupal.comment-node-bundle.0.patch queued for re-testing.

#2

Version:7.x-dev» 8.x-dev

#3

#4

drupal.comment-node-bundle.0.patch queued for re-testing.

#5

Status:needs review» needs work

The last submitted patch, drupal.comment-node-bundle.0.patch, failed testing.

#6

Status:needs work» needs review

Re-rolled against latest branch head.

AttachmentSizeStatusTest resultOperations
drupal8.comment-node-bundle.6.patch776 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 32,915 pass(es).View details

#7

Status:needs review» reviewed & tested by the community

To me this looks like a sensible addition. The patch is very simple, and looks good to me.

#8

The patch applies without offset to D7. So should be ready for straight backport.

#9

Version:8.x-dev» 7.x-dev

Looks good to me as well, I'm pretty sure I've had to figure out the node type back from the comment before as well.

Committed to 8.x, moving to 7.x for webchick to consider.

#10

Status:reviewed & tested by the community» fixed

This seems like a pretty harmless and convenient API addition. I'm comfortable committing to 7.x as well.

Committed/pushed. Thanks!

#11

Status:fixed» closed (fixed)

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