When other modules change pwd, the way that advanced_forums does its includes does not work. I patched my version to use the same method for including as core (using DRUPAL_ROOT). Patch attached.

CommentFileSizeAuthor
#2 af7_1270710_1.patch1.24 KBtroky
advanced_forum_includes.patch1.82 KBbxc

Comments

2ifx.com’s picture

yeah and this was the error message we were getting before we patched it:

# Warning: include_once() [function.include]: Failed opening 'sites/all/modules/advanced_forum/includes/core-overrides.inc' for inclusion (include_path='.:') in include_once() (line 516 of/var/www/vhosts/***.com/httpdocs/portal/sites/all/modules/advanced_forum/advanced_forum.module).
# Warning: include_once(sites/all/modules/advanced_forum/includes/mark-read.inc) [function.include-once]: failed to open stream: No such file or directory in include_once() (line 519 of/var/www/vhosts/***.com/httpdocs/portal/sites/all/modules/advanced_forum/advanced_forum.module).
# Warning: include_once() [function.include]: Failed opening 'sites/all/modules/advanced_forum/includes/mark-read.inc' for inclusion (include_path='.:') in include_once() (line 519 of/var/www/vhosts/***.com/httpdocs/portal/sites/all/modules/advanced_forum/advanced_forum.module).
# Warning: include_once(sites/all/modules/advanced_forum/includes/theme.inc) [function.include-once]: failed to open stream: No such file or directory in include_once() (line 510 of/var/www/vhosts/***.com/httpdocs/portal/sites/all/modules/advanced_forum/advanced_forum.module)

The issue started appearing when we changed the directory name of our drupal directory. We uninstalled, re-installed, cleared caches, uninstalled other modules, re-installed, but the error kept coming back.

the patch above fixes the issue.

troky’s picture

Status: Active » Needs review
StatusFileSize
new1.24 KB

I believe using module_load_include() is proper way to fix this.
Please, try attached patch and report back.

2ifx.com’s picture

cool, thanks troky for the input, i will test it later on and report back.

bxc’s picture

af7_1270710_1.patch in comment #2 works for me.

troky’s picture

Status: Needs review » Closed (fixed)

Thanks for testing. Committed.