I've been getting watchdog messages from adv forums as follows:
Notice: Trying to get property of non-object in advanced_forum_forum_load() (line 125 of /var/www/drupal-prod/sites/all/modules/advanced_forum/includes/core-overrides.inc).
and
Notice: Undefined property: stdClass::$tid in advanced_forum_forum_load() (line 130 of /var/www/drupal-prod/sites/all/modules/advanced_forum/includes/core-overrides.inc).
at page: [SITE]/forum/ - so the main forum view where there's no taxonomy selected. This ONLY happens at [SITE]/forum/ not at [SITE]/forum - note the trailing slash.
I think it's because there's a disconnect on the value passed in in that case. If no tid is passed into advanced_forum_forum_load(), then the default values get set because tid is NULL, so that works fine - but...
The problem is with the trailing slash we get a load in which the tid passed in is NOT unset - it's an empty string not NULL. Tid isn't unset, so the stuff meant to keep tid from getting left off never gets called so we end up trying to reference nonexistent values.
So one line to change - just the one - should fix this. In core-overrides.inc, at 93: if (!isset($tid)) { change this to if (empty($tid)) {
Comment | File | Size | Author |
---|---|---|---|
#1 | advanced_forum-2218889.patch | 383 bytes | Bastlynn |
Comments
Comment #1
Bastlynn CreditAttribution: Bastlynn commentedPatch against 7.x
Comment #2
Bastlynn CreditAttribution: Bastlynn commentedComment #3
podaroknice catch
commited
Thanks!