Comments are working

By jeff

Published:

A blog isn't a blog without comments. I tried to get around those semantics by calling this a homepage, but just because you say something doesn't make it true, even in 2022.

I knew this for a while and have tried different ways to take the discussion off the site here to twitter or mastodon. This had the advantage of bringing the discussion to the place that people already are rather thnan trying to get them here.

My first attempt started to hiccup almost immediately and I removed it from the site. I tried a couple alternatives like the ones described here written for hugo (another SSG), but my understanding of JS is too limited and I don't want to dig into it that far.

Then I started thinking about my business site and having a central, self-hosted commenting system that I can manage would allow me to use it for a bunch of different sites. When I started searching my preferred option was Commento and I finally got it working on my home server, but got stuck with getting browsers to trust the information back and forth. Again this was going to be a hole that I wasn't ready to work on right now. [1]

So I have defaulted to a system that I used to understand (PHP has grown up a lot from when I used it a lot), Hashover 2.0

Setting up Hashover

I found Hashover about a week ago and immediately gave it a try, then failure. I wasn't sure what I was doing wrong so it was starting to get frustrating. PHP is supposed to be easy, or so I told myself.

Then I did a bit more research and tested a couple more things, and no luck; but I was getting closer. By this time I really started to understand the utility of the developer tools in Firefox, and I was making progress. Unlike working cross-servers with Commento I knew that the problem was local.

It hit me

I wonder if its a version thing? I pulledup my phpinfo() to see if there is anything there that was obvious. I was running the latest PHP version, 8.1.10. When I configured that I was only developing my own scripts, like the Mastodon Comments one so I wanted to make sure that I was working on the edge, somewhere where once I had it working I wouldn't need to worry about it much.

And this is where I was running into issues. When I was reviewing the requirements the only thing that popped out was that you needed to be using AT LEAST PHP 5.3, and there was nothing mentioned that PHP8 was going to be an issue. My last ditch check, to make sure that it WAS a PEBKAC issue I downgraded my PHP to latest version of PHP7, reloaded and ...

IT WORKS

So starting today I have comments on the site. When I have a bit more time I will write a full post for the how I pelican series. I need to do a few things including:

  • Update theme so the comments fit better
  • Update CSS to make the style fite better with the theme
  • Include a meta-variable to turn off comments on a per article basis
  • Clean up the troubleshooting mess
  • etc

When that is done I will let everyone, including future me, know how it works.

[1]Fall is too busy to deal with things like this. However, even after everything I've been through, Commento is my preferred option and I will either cloud self-host for all my sites, buy it for JMK Engineering, or get my home version working, but that is a longer term project.

Comments