Hey all, I am receiving this error when I click the link in the main menu bar entitled forum. I receive the same error from the new dev code as well six lines (371 and 372) further into the code. I have the panels everywhere module and the AT panels everywhere theme enabled.

Notice: Undefined offset: 1 in advanced_forum_preprocess_views_view__advanced_forum_topic_list() (line 365 of /var/www/html/sites/all/modules/advanced_forum/includes/theme.inc).
Notice: Trying to get property of non-object in advanced_forum_preprocess_views_view__advanced_forum_topic_list() (line 366 of /var/www/html/sites/all/modules/advanced_forum/includes/theme.inc).

thanks for any and all help!

CommentFileSizeAuthor
#1 af7_1913170_1.patch1.28 KBtroky

Comments

troky’s picture

Status: Active » Needs review
StatusFileSize
new1.28 KB

Try this patch and report back.

pjmcghee’s picture

[root@pj-hp advanced_forum]# curl http://drupal.org/files/af71913170_1.patch | git apply
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 11441 100 11441 0 0 16030 0 --:--:-- --:--:-- --:--:-- 23541
error: No changes
[root@pj-hp advanced_forum]#

i confirmed also that I am on the 7.x.2.0 code and not the dev code. Thanks for your quick reply on this. i appreciate it!

troky’s picture

You have error in patch url... it should be http://drupal.org/files/af7_1913170_1.patch
If you have problems applying it on 2.0 do it manually, it's not big patch.

pjmcghee’s picture

first, i am sorry for the completely dunderheaded mistake before. I'm relatively new to drupal and i have only installed one other patch before. so, i apologize. plus, it was rather early and I hadn't had coffee yet... ;-)

i did get an the following error - i assume this is what you meant by "if you have problems...." so i'll try it manually and get back to you. thanks for the help.

[root@pj-hp advanced_forum]# curl http://drupal.org/files/af7_1913170_1.patch | git apply
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1307 100 1307 0 0 4457 0 --:--:-- --:--:-- --:--:-- 12447
error: patch failed: includes/theme.inc:367
error: includes/theme.inc: patch does not apply
[root@pj-hp advanced_forum]#

pjmcghee’s picture

I hate to ask for this and I did try, but I am having trouble installing the patch manually. i'm just not familiar with what needs to be replaced and what needs to be added. when i replaced the code that I thought was relevant with the code in the patch i broke the entire site and had to roll back to the previous saved theme.inc. i know that I am doing something wrong. can you assist? thanks and sorry for my ignorance!

troky’s picture

edit /includes/theme.inc b/includes/theme.inc and change:

if ($menu_item['map'][0] == 'forum') {
    $forum = $menu_item['map'][1];
    if ($forum->vid == variable_get('forum_nav_vocabulary') && $forum->tid > 0) {
      $variables['node_create_list'] = theme('advanced_forum_node_type_create_list', array('forum_id' => $forum->tid));
      $variables['forum_description'] = $forum->description;
      $variables['forum_tools'] = advanced_forum_forum_tools($forum->tid);
      $variables['forum_jump'] = advanced_forum_forum_jump($forum->tid);

to:

  if (!empty($menu_item) && $menu_item['access']) {
    if (($menu_item['map'][0] == 'forum') && (!empty($menu_item['map'][1]))) {
      $forum = $menu_item['map'][1];
      if ($forum->vid == variable_get('forum_nav_vocabulary') && $forum->tid > 0) {
        $variables['node_create_list'] = theme('advanced_forum_node_type_create_list', array('forum_id' => $forum->tid));
        $variables['forum_description'] = $forum->description;
        $variables['forum_tools'] = advanced_forum_forum_tools($forum->tid);
        $variables['forum_jump'] = advanced_forum_forum_jump($forum->tid);
      }

... around line 367

pjmcghee’s picture

Status: Needs review » Closed (fixed)

Thank you, kind sir for your help. The issue was there needed to be four curly brackets at the end of the code. I didn't count properly and the code did not work because I only put in three. I trusted my aptana code editor to help me on this but nothing showed as an error. I appreciate your help and I appreciate learning the hard way. that is usually the best!

Take care and have a good day!