I have a few other modules that use hook_theme_registry_alter to make changes to theme paths, but it all stops working when advanced_forum is installed.
Looking at the code from line 317 in advanced_forum.module, this loop seems to be causing the problem and seems to get very confused with the existing path.
// If there was a path in there, store it.
$existing_path = array_shift($theme_registry[$template]['theme paths']);
// Add paths for our style and ancestors before the existing path, if any.
foreach ($lineage AS $style => $style_path) {
array_unshift($theme_registry[$template]['theme paths'], $existing_path, $style_path);
$existing_path = array_shift($theme_registry[$template]['theme paths']);
}
It removes the first existing path and then for each iteration it adds it and then removes it once again, leaving it off at the end and I can't see why.
Patch to follow....
Comments
Comment #1
smoothify commentedThis patch simplifies things, it simply adds the new advanced forums paths before anything else, then it adds the existing paths, finally its followed by the theme ancestor paths.