Hacking Live Preview

My PHP error logs are filling up with errors like this one:

[05-May-2007 06:11:56] PHP Notice: Undefined variable: livePreviewDivAdded in /var/www/thecafes/wp-content/plugins/live-comment-preview.php on line 24

so I decided to see if I could fix it. I think the problem is this line:

$livePreviewDivAdded == false;

I’m using this post to test that.

4 Responses to “Hacking Live Preview”

  1. Elliotte Rusty Harold Says:

    Let’s see if the live preview still works. Yep it does.

  2. Elliotte Rusty Harold Says:

    Now let’s see if I’m still getting the error message. Hmm, looks like I am. Maybe that’s not it?

  3. Elliotte Rusty Harold Says:

    What if I just comment out that line? Live preview still seems to work, and I’m not seeing any error messages. I wonder why? Don’t you love experimental programming?

  4. Elliotte Rusty Harold Says:

    Oh wait. It’s this bug again. The first fix (== to =) did repair the problem here. The error messages I was getting were from The Cafes, not Mokka mit Schlag. I need to update both version of the plugin. DRY strikes again.

Leave a Reply