This is a weird one, and I'm hard-pressed to reproduce it, but regardless of cause and effect, the attached patch should be committed anyways, to make the generated $prefixes array structure similar to that returned by module_list().
In d6_compat.inc, you define the default preprocess function, $prefixes[] = 'template';, which will eventually map to template_preprocess_forum() (same file). However, because you define it without an array index, it gets stored as: [0] => 'template'. You then add all the modules to the list via module_list(). That function sets modules as ['block'] => ['block']. At the very least, the attached patch will set 'template' to be list the rest of the modules.
However, I think there's also a bug here that recently bit my site (where we ended up truncating the cache, which called a recreation of this preprocess function list). After adding 'template' and all the modules to the $prefixes, you run through a blacklist routine to remove 'search' from the lookup. You end up doing this great foreach with an array_search and all this crap (when you could simply do unset($prefixes['search']), which would also be another legitimate fix/patch). When search.module isn't enabled (and thus, not returned in module_list), array_search() will return FALSE. The code, however, blindly will attempt to unset [$prefixes[FALSE]], which I BELIEVE kills off [0] => 'template'. Removing 'template' from the prefixes list breaks the entire module (since template_preprocess_forums is never run).
Ahem.
Nutshell? Apply this patch ;)
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | d6_compat.txt | 15.79 KB | michelle |
| _preprocess_cache.patch | 1.08 KB | morbus iff |
Comments
Comment #1
morbus iffComment #2
michelleHaving just gotten bit by this and spending an hour trying to track it down before suddenly -- duh! -- remembering Morbus had already fixed it, I can attest this is totally RTBC and will be first on the list the next time I work on AF.
If you are having problems with the forums not showing up in alpha 13, try this patch. Changing the title so people can find it easier.
Michelle
Comment #3
lismail commentedHi Morbus,
This patch works.
Thanks alot.
Lucky
Comment #4
michelleBecause this is a rather critical bug and the next alpha is a ways off, I'm attaching the patched file here as well. Change .txt to .inc.
Michelle
Comment #5
michelleCommitted, finally, thanks. :)
Michelle
Comment #6
mouse77e commentedThis thread is for 5.x-1.x-dev but the patch says D6...? which is it for?
Comment #7
michelleIt's for 5.x. The patch is for the d6_compat file.
Michelle
Comment #8
mouse77e commentedCan someone PLEASE send me a copy of the patched module as i am not in a position to do the patching myself - i am running my site from a netbook at the moment /////// PLEASE \\\\\\\
Comment #9
michelle@mouse77e - http://drupal.org/node/325639#comment-1095149
Michelle