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.
When I preview a comment then clear all caches this error is shown when I refresh the preview comment page.
If I then backtrack to the forum then click the topic then add a comment and preview the error disappears.
The reply to button is not shown on the preview so maybe that has something to do with it when re-establishing the cached version of the forum.
the following is the code from the module
800 function advanced_forum_get_reply_link($node) {
801 $reply_link = array();
802
803 $comment_setting = $node->comment;
804 $fragment = 'comment-form';
805
806 if ($comment_setting == COMMENT_NODE_OPEN) {
807
808 $allowed = false;
809 if (module_exists('forum_access')) {
810 // get tid
811 if (!empty($node->taxonomy_forums)) {
812 reset($node->taxonomy_forums);
813 $langcode = key($node->taxonomy_forums);
814 if (!empty($node->taxonomy_forums[$langcode])) {
815 $tid = $node->taxonomy_forums[$langcode][0]['tid'];
816 if (forum_access_access('create', $tid)) {
817 $allowed = true;
818 }
819 }
820 }
821 }
822 else {
823 $allowed = user_access('post comments');
824 }
Comments
Comment #1
inventlogic CreditAttribution: inventlogic commentedI managed to fix this by configuring the forum settings more appropriately.
I had customized the templates so I think also there was an issue there.
Works as designed so closed.
Comment #2
0mni CreditAttribution: 0mni commentedI am having a similar issue, most likely due to the same cause you had, what was your issue and solution ?
Comment #2.0
0mni CreditAttribution: 0mni commentedadded line numbers
Comment #3
yuriy.kostin CreditAttribution: yuriy.kostin commentedBug not replicate on Versions: 7.x-2.x, 7.x-2.1 and 7.x-2.5