Comments are Back!

So the last few days I have been seeing a drop in comment activity. Spam comments were abundant as usual, but the kind of thoughtful and insightful commentary I’m used to has dwindled down to zero. I was a little bummed out by this. I figured that maybe I’m loosing my touch. Or maybe I was posting too many “wall of text” type rants that no one had time or energy to read. Granted, I’ve been busy with other stuff so I tried not to let it bring me down. It was just a little disheartening to hit the blog every other day and see there are no comments at all on any of the posts featured on the front page. Then last night Karthink messaged me on Steam asking why I closed the comments on the blog.

The thing is, I never disabled anything. I love the comments, why would I shut them off?

So I hit the site and… Yep, no comments. They are just gone. Vanished! What the actual fuck!

Let’s Talk PHP

When you are running PHP, by default it likes to vomit error messages into it’s standard output channel, which is your webpage. What usually happens is that you get half of the page, then a stack trace, and then the execution just stop. This looks kinda unprofessional, plus it gives potential attackers way too much information about your sever. So when you are running in a production environment you squelch these errors and they are written to an error log somewhere. The side effect is that PHP will still stop executing at the point where it encountered a fatal error. If this happens at the begging of your script before anything was output then you just get a blank page. If it happens somewhere towards the bottom, and your page is a usual tag soup (PHP mixed with raw HTML) then you will usually get everything up until the error and the rest of the page remains blank.

This was exactly what was happening with the comments.

Related Posts

For years now I have been using a Related Posts plugin by Jure Ham. It is a nifty little addition to the blog, that does some fuzzy logic matching and displays links to potentially similar topics at the bottom of each post. I like it because it enables the sort of aimless wandering – you finish reading a post and you go – “oh, this looks interesting too” so you click over and keep on reading. Sometime last week Jure released an update – a first one in quite a while, and a good one at that. Lots of new functionality, a lot of improvements… And also apparently some backwards compatibility breakage which I didn’t notice.

I applied the update without thinking much about it, as you do, because it is usually a painless process. Very rarely will a plugin actually cause trouble after an update, and 99% of the time it happens right away and you fix it or ditch the plugin. This time the issue remained hidden because it was only evident on individual post pages, and only if you scrolled all the way down to see the comments. Ooops!

The new update actually made the plugin simpler – it now injects itself into the pages on its own. Before you had to explicitly call it with a PHP hook from your template. That’s where it failed for me. Apparently the function call to the plugin I had right above my comment section got deprecated and was throwing some sort of an exception. Hence comments would not load.

Oh, and Steam…

Btw, I should probably mention this – I never turn of my desktop and it usually runs Steam in the background. So while it may appear like I’m idling on steam all the time, the fact is that I’m actually rarely there. The only time you can probably reliably catch me on there when it’s green and says “in game”. Otherwise I might not be at my desk at all. I say this, because every once in a while I will come home, and see a Steam chat window open with a message that was sent 8 hours ago, and then a long stream of “so and so just signed off, now he signed on, now he signed off again”. So it’s not that I’m avoiding or ignoring you. I’m just probably not there, and I suck at turning off chat thingies.

TL;DR

I broke the comments, but they are back now. Sorry! Also, as a consolation, related posts section now has mini-screenshots.

This entry was posted in Uncategorized. Bookmark the permalink.



6 Responses to Comments are Back!

  1. Pics look fine.

    Todo: check how those mini-screenshots look in an rss feed, and consider turning them off there?

    Reply  |  Quote
  2. MrJones2015 GERMANY Mozilla Firefox Windows says:

    >How’s my programming? Call 1-800-DEV-NULL
    >Ah, young webmaster… java leads to shockwave. Shockwave leads to realaudio. And realaudio leads to suffering
    >I’m sorry, our software is perfect. The problem must be you

    Source:http://nadh.in/docs/geek_jokes/

    Reply  |  Quote
  3. k00pa FINLAND Mozilla Firefox Windows Terminalist says:

    What is really weird about your Steam chat is that it never actually goes to “away/snooze” status. Its always online. The automatic autoaway thing doesn’t work for you for some reason..

    But yeah, in the new Steam beta there are offline messages, should solve the problem.

    Reply  |  Quote
  4. Luke Maciak UNITED STATES Google Chrome Linux Terminalist says:

    @ Tormod Haugen:

    Yeah, I’m turning them off in the feed. Looks messy. :P Thanks for the tip.

    @ MrJones2015:

    Real Audio? Did that actually even exist? I remember hating it, but it was so long ago that it all seems like just a bad dream. Let’s pretend that Real* universe never existed, ok?

    @ k00pa:

    Oh wow, that’s odd. I figured it goes on snooze eventually but people message me anyway. Whelp, I guess my steam is broken. And I just don’t have enough fucks to actually try and fix it. As long as I get messages it is good enough. :P

    Does it matter if Steam window is open in the background? Cause I sometimes just leave it open.

    Reply  |  Quote
  5. k00pa FINLAND Mozilla Firefox Windows Terminalist says:

    @ Luke Maciak:

    I am actually not sure how the auto-away is triggered, but I don’t think keeping the Steam window open cancels it.

    There is also way to manually set the status to away, but I never myself bother to do it..

    Reply  |  Quote
  6. Mitlik UNITED STATES Mozilla Firefox Windows says:

    Since this is meta about comments… I have been reading for several year and I enjoy the ideas you share. I wish I would find the time to try some of this stuff: Pogo-plug file server, Jekyll, php, and new (to me anyways) programming tools/concepts. So from at least one mostly lurker; I am enjoying your work (and now Chris’ at nullprogram too) and the slight course adjustment so keep up the good work. Maybe someday we’ll get a wall of text from you about using LaTeX to banish teh power point!

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *