We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

I enable my extension, and the forums

Development and Programming

caycifish's avatar
caycifish
12 posts
16 years ago
caycifish's avatar caycifish

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:



						
       
caycifish's avatar
caycifish
12 posts
16 years ago
caycifish's avatar caycifish

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>
       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
16 years ago
Ingmar Greil's avatar Ingmar Greil

This looks like it’s coming from your web server, not EE.

       
caycifish's avatar
caycifish
12 posts
about 16 years ago
caycifish's avatar caycifish

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.

       
caycifish's avatar
caycifish
12 posts
about 16 years ago
caycifish's avatar caycifish

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

       
caycifish's avatar
caycifish
12 posts
about 16 years ago
caycifish's avatar caycifish

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...
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.