Hello, I am receiving this error when I click the Active, Unanswered and New &... Topics tabs in the Advanced forum.
Notice: Trying to get property of non-object in advanced_forum_preprocess_views_view__advanced_forum_topic_list() (line 367 of /var/www/html/sites/all/modules/advanced_forum/includes/theme.inc).
Here is the code. Line 367 is indicated.
$menu_item = menu_get_item();
if (!empty($menu_item) && $menu_item['access']) {
if (($menu_item['map'][0] == 'forum') && (!empty($menu_item['map'][1]))) {
$forum = $menu_item['map'][1];
367 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);
Thanks for all your help!
Comments
Comment #1
troky commentedPlease don't create duplicate issues.
#1913170: error when clicking the forum link from the main menu.
I can't replicate your problem. It looks something on your system is interfering with menu structure.
Try to clear cache twice and see if problem persists.
Comment #2
pjmcghee commentedok, sorry i don't mean to be a pest. but the issue isn't presenting itself the same way. i'll clear the caches and see what happens. since it appears that it is local to my system. i'll let you know. thank again and sorry!
Comment #3
pjmcghee commentedi did clear the caches twice but am still experiencing the issue. but it doesn't happen when i click the Forum link like before, only when i click the other three tabs.
i understand that you can't reproduce and can't address the issue and that it is local to my installation. Can you give me any suggestions as to where to look? I will say that I have quite a few of the multilingual mods installed and had so many problems that I ended up disabling them.
thanks again for all your help and sorry to be a pest.
Comment #4
troky commentedyou can add line:
before problematic line 367 and paste $forum value.
Also, you could try to disable some modules that could mess up menu structure.
Comment #5
pjmcghee commentedthanks, i'll try those suggestions and let you know.
Comment #6
pjmcghee commentedHi, Just to let you know it appears that the offending module is panels everywhere 7.x-1.0-rc1. i've tested it in my sandbox and quality environments and it happened in both. it wasn't any of the multilingual mods that I thought it might be.
Comment #7
troky commentedAnyway, it would be nice to see that $forum variable dumped as per #4.
Comment #8
pjmcghee commentedI did try those options to the best that I could. I added:
dpr($forum);
then
dpm($forum);
before problematic line 367 but it broke the module each time.
But, i wasn't really sure what to do with the instruction about "paste $forum value" so I am sure that i am doing it incorrectly.
i would be more than willing to try it if you can provide an exact syntax.
Comment #9
pjmcghee commentedlater today, i'll look up the use for dpm() and dpr() and see if I can't figure out how to make it work. it will be good for me.