Recent Topics

1 Jul 22, 2006 20:03    

I'm running b2evolution 0.9.0.12 with various customizations and hacks I've implemented.

I'm having a problem whereby, when I've UNchecked the "remember me" checkbox on a comment form, htsrv/comment_post.php seems to be erasing only the $cookie_name cookie, but not the $cookie_email cookie.

I'd like to be able to trace what's happening within comment_post.php to follow the action in order to debug this problem.

In other functions, that are writing directly to the HTML output, I just use echo() to follow the action. However, within comment_post.php, echo() doesn't seem to write to the HTML page. (I guess because it's post-processing the HTML page, rather than preparing new HTML.)

So... how can I observe the action within comment_post.php?

I thought about using fprintf or something like that, but I'm not sure how to specify a path/file for it to print to.

I know that there's a debug option in conf/_advanced.php and I did turn it on, and I discovered I could find output from it on the admin/login page. However, I don't know how to write to it myself.

The site I'm working on is

http://lakeshoreneighbors.org/blog/

A big thanks in advance for any suggestions on debugging strategies!

Jim

2 Jul 23, 2006 20:00

You can add to the Debuglog yourself with

$Debuglog->add( $msg, $cat );


$Debuglog is a global.

But, with debugging comment_post.php you'll have no luck: after the comment has been posted, the user gets redirected (in the bottom of that page).

However, if you use "echo" in that script, this should fail (unless you are not using output buffering), because "Headers have already been sent" then.

I'd just add a die("test"); before the header-redirect at the bottom of comment_post.php. This way you should see your output from "echo".

3 Jul 23, 2006 20:04

[I'd just add a die("test"); before the header-redirect at the bottom of comment_post.php. This way you should see your output from "echo".[/quote]

Thanks for the background info and also for the very helpful "die" tip!


Form is loading...