Commit 11bf64e9 authored by webchick's avatar webchick

Issue #2207219 by larowlan: Fatal: Call to a member function isSubclassOf() on...

Issue #2207219 by larowlan: Fatal: Call to a member function isSubclassOf() on a non-object in CommentManager.
parent a9a2ae1a
......@@ -228,7 +228,7 @@ protected static function buildLinks(CommentInterface $entity, EntityInterface $
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,
);
}
......
......@@ -460,6 +460,11 @@ function testForumWithNewPost() {
$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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment