Issue #2207219 by larowlan: Fatal: Call to a member function isSubclassOf() on a non-object in CommentManager.

8.0.x
webchick 2014-02-27 20:54:33 -08:00
parent a9a2ae1a33
commit 11bf64e992
2 changed files with 6 additions and 1 deletions

View File

@ -228,7 +228,7 @@ class CommentViewBuilder extends EntityViewBuilder {
if ($entity->access('create')) {
$links['comment-reply'] = array(
'title' => t('Reply'),
'href' => "comment/reply/{$entity->getCommentedEntityId()}/{$entity->getCommentedEntityId()}/{$entity->getFieldName()}/{$entity->id()}",
'href' => "comment/reply/{$entity->getCommentedEntityTypeId()}/{$entity->getCommentedEntityId()}/{$entity->getFieldName()}/{$entity->id()}",
'html' => TRUE,
);
}

View File

@ -460,6 +460,11 @@ class ForumTest extends WebTestBase {
$this->drupalPostForm('node/' . $node->id(), $edit, t('Save'));
$this->assertResponse(200);
// Test replying to a comment.
$this->clickLink('Reply');
$this->assertResponse(200);
$this->assertFieldByName('comment_body[0][value]');
// Login as the first user.
$this->drupalLogin($this->admin_user);
// Check that forum renders properly.