Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#10 | advanced_forum-node-content-is-undefined-2862436-10.patch | 810 bytes | percoction |
| |||
#2 | advanced_forum-node-content-is-undefined-2862436-1.patch | 560 bytes | super_romeo |
|
Comments
Comment #2
super_romeo CreditAttribution: super_romeo commentedComment #3
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedComment #4
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedfixed it for me
Comment #5
spamator12 CreditAttribution: spamator12 commentedI can also confirm that this fixed my error message with AD_7.x-2.7-rc0
Comment #6
rahim123 CreditAttribution: rahim123 commentedadvanced_forum-node-content-is-undefined-2862436-1.patch fixes issue #3064321 for me. Thanks a lot!
Comment #7
rahim123 CreditAttribution: rahim123 commentedComment #8
SpokjePatch applied cleanly and removes the mentioned Notice in the issue title.
Needs Review => RTBC
Comment #9
ron_s CreditAttribution: ron_s commentedThis 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
Comment #10
percoction CreditAttribution: percoction commentedHere is a patch taking the approach mentioned in #9.
I did not, however, revert the commits here, but rather rollback the changes manually