On pages /comment/reply/xxx function node_is_page($node) returns FALSE.

function comment_node_view($node, $view_mode) {
  ...
  if ($node->comment && $view_mode == 'full' && node_is_page($node) && empty($node->in_preview)) {
    $node->content['comments'] = comment_node_page_additions($node);
  }
  ...
}

So $node->content is undefined.

Patch attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

super_romeo created an issue. See original summary.

super_romeo’s picture

SocialNicheGuru’s picture

Status: Active » Needs review
SocialNicheGuru’s picture

fixed it for me

spamator12’s picture

I can also confirm that this fixed my error message with AD_7.x-2.7-rc0

rahim123’s picture

advanced_forum-node-content-is-undefined-2862436-1.patch fixes issue #3064321 for me. Thanks a lot!

rahim123’s picture

Spokje’s picture

Status: Needs review » Reviewed & tested by the community

Patch applied cleanly and removes the mentioned Notice in the issue title.

Needs Review => RTBC

ron_s’s picture

Status: Reviewed & tested by the community » Needs work

This does not work. We use a panels pane to render our comment form, and applying this patch causes CKEditor to not load.

The only way for us to fix is to rollback the changes made in advanced_forum_get_reply_link as part of 7.x-2.8:

https://git.drupalcode.org/project/advanced_forum/commit/ad7b4be
https://git.drupalcode.org/project/advanced_forum/commit/beb844e

percoction’s picture

Here is a patch taking the approach mentioned in #9.

I did not, however, revert the commits here, but rather rollback the changes manually