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();
803   $comment_setting = $node->comment;
804   $fragment = 'comment-form';
806   if ($comment_setting == COMMENT_NODE_OPEN) {
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     }


inventlogic’s picture

Status:Active» Closed (works as designed)

I 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.

0mni’s picture

Status:Closed (works as designed)» Needs work

I am having a similar issue, most likely due to the same cause you had, what was your issue and solution ?

Notice: Undefined offset: 0 in advanced_forum_get_reply_link() (line 824 of /sites/all/modules/advanced_forum/advanced_forum.module).
Notice: Undefined offset: 0 in advanced_forum_get_reply_link() (line 824 of /sites/all/modules/advanced_forum/advanced_forum.module).
0mni’s picture

Issue summary:View changes

added line numbers

yuriy.kostin’s picture

Issue summary:View changes

Bug not replicate on Versions: 7.x-2.x, 7.x-2.1 and 7.x-2.5