From: Rui C. <rui...@ac...> - 2004-12-06 11:29:31
|
Hello there. I'm running a heavily customized version of PhpWiki at http://the.taoofmac.com, and have come up with an interesting problem. It might be from my tweaks (I forked my code from PhpWiki sometime around 1.3.7, I think), but plugins in the node contents seem to be invoked twice, i.e: * if I use PageTrails as part of browse.tmpl, it is only invoked once * If I add <?plugin PageTrails ?> to my Sandbox, the plugin code (i.e., run()) gets invoked twice, even though the output is only shown once. This is tolerable for simple stuff like PageTrails, but a _major_ nuisance for TitleSearch and whatnot (which is what I'm trying to optimize). I'm blaming it on template expansion (which I haven't modified myself and might have a few lingering bugs not present in current CVS), but instead of upgrading (which would mean refactoring all my current custom plugins and subpage handling) what I would _really_ like are some pointers as to how to go about debugging this, namely: * In which conditions are plugins expanded * if dump_template() is useful for debugging that (the initial results aren't satisfactory, but I might have missed something) I'm currently trying to wrap my neurons around printExpansion(), which is what I see getting called more often. I would have used PHP's call stack debugger if I could, but have to resort to browser output and file logging, so it's tough going (some sort of call graph for page generation would also be nice, since it is nigh on impossible to just use error_log() with all the built-in error handling mechanisms). Thanks, Rui Carmo http://the.taoofmac.com |