I am at a loss as to what I am doing wrong. No matter which hook I use for the forums module (I have tried several), and even when I have the method for that hook just spit the output back out with no processing, with the extension enabled the forums threads spit out “empty” html (ie, a white screen). I’m not sure why my extension is breaking all the processing/rendering for the forums threads. Any assistance would be great.
Here is the current version:
Nothing?
Is there anything obvious that would immediately halt execution? I have turned on every debugging and error reporting method I have found, and nothing is getting generated anywhere. Is there a way to write to the error log by hand so I can see where things are breaking myself?
Oh, and by “white screen” I mean this is the source:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
It appears that all the processing is happening as it should (I put echo and die statements in mod.forum and mod.forum_core to try to debug), but I can’t figure out where the disconnect is.
Where does the forum actually print something to the browser? What line in what file? Maybe I can work backwards from there.
Mod Edit: Merged from Tech Support as more appropriate here
I posted over in the Extension development board as well, but I do see that I might get more debugging help here.
I have an extention to the forums module (right now it’s using forum_thread_rows_loop_end hook, but it doesn’t seem to matter which hook I use, I get the same results). When the extension is enabled, I get a blank screen. Even when I return $temp (or $thread_rows, or whatever is appropriate for that experiment’s hook) exactly as passed, merely enabling the extension causes nothing to be sent to the browser.
I have been hacking mod.forum and mod.forum_core with echo and die statements, trying to figure out where it is having the problem, but nothing is making any sense yet. I have forced the various variables to the browser with the echo statements just to see the string processing happening, and all looks well.
Here is a hopefully easy question: which line in which file actually is responsible for printing the forum to the browser? I’m hoping I can work backwards from there.
Also, is there a better debugging mechanism (ie, writing to the log)?
Thanks
So far I have managed to trace through the forum code enough to find a hack that works, but perhaps it’s a bug? If no one has any ideas on why I would need to do the below I’ll go ahead and report it as a bug.
I add the flush() line below and everything works perfectly, but I’m really not comfortable with this “solution”.
in mod.forum_core:
function _display_forum($function = ''){
...blah blah...
if ($this->_use_trigger() OR $IN->GBL('ACT') !== FALSE)
{
$OUT->build_queue(
$FNS->insert_action_ids(
$FNS->add_form_security_hash(
$this->_final_prep(
$this->_include_recursive($function)
))));
added this line---->flush();
}
else
{
global $TMPL;
....blah blah rest of function...
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.