Cognitive Conga: a blog

Dancing the conceptual kerfuffle shuffle

Ratiocination, n. An instance of [reasoning]. Also: a conclusion arrived at by reasoning. Doubt the applicability of this at your peril leisure.

Woepress

Because some personal and professional web projects I’m working on at the moment are using Wordpress as a CMS – or even as a pseudo web framework – it’s becoming prudent for me to learn the structure of its guts.

My opinion about WordPress has long been that it’s an excellent blogging engine, but that this acts against its suitability as a general purpose CMS, and even further against its usability as a general purpose web framework. Even though the wordpress.org community is working to improve the platform’s workability in the latter two roles, WordPress still has many blog-centric assumptions built in. These assumptions are a hindrance to developers like myself, who would prefer to use a more content-agnostic framework (e.g. Django or Symfony) unless we’re creating a site that is first and foremost a blog. Indeed, using WordPress to build a web app that calls for a framework would be like using a nice racing bike for an off-road adventure: an uncomfortable and costly experience.

But, as I’ve said, I need to use it for a few projects: projects that aren’t entirely under my control. And since I want to reduce the number of frameworks/CMSs/etc I’m trying to keep up to speed with, I’m thinking of migrating my own website (which remains, apart from this blog, very much an offline work in progress) onto WordPress, to force myself to learn to love it… or at least, to fight from the belly of the beast. So here I go, fitting chunky tyres, suspension, and a new frame, handlebars, saddle, brakes and gears to my racing bike, like a crazy person…

Yesterday, I encountered the first of the many bugs caused by WP’s blog-centric development I anticipate encountering while I undergo this process. It’s a problem with home.php, which the Wordpress docs say in one place is for the site’s homepage, but say in other places is for the blog index (i.e. a list of the latest blog posts). Given the name of the file, I think it ought to be for the former, but in practice it acts as the latter, which in my opinion is a bug.

I posted to the WordPress forum about it, but received no replies, so today I decided to ask for feedback on #wordpress. While I was waiting for a reply on #wordpress, I also searched the WordPress bug reports to see if it had been reported as a bug, and found that it had, although the reporter’s proposed solution is not quite the one I’d have preferred. It’s a start, but it looks like if I’m going to get my way, I’ll have to get more involved, and in any case, the fix won’t be made to WordPress until at least the next point release.

So, I’m in the belly of the beast, and I’m fighting.

For posterity, and for credit to #wordpress user indranil especially, here’s a log of the IRC chat I had on #wordpress (I’ve deleted posts irrelevant to my issue):

[14:07] *** now talking in #wordpress
[14:09] <sampablokuper> Hi folks, I posted a message to the forum yesterday about home.php functionality, but it was to a thread marked as "solved", so I don't think anyone's really been very interested in following it up. I'd be grateful for opinions. Here's the thread: http://wordpress.org/support/topic/194606
[14:57] <indranil> sampablokuper: the thing is, you're overriding what's called "home", hence home.php is not required anymore.
[14:57] <indranil> it's not a bug
[15:01] <sampablokuper> indranil, can you explain that in a bit more detail please? How is it being overridden?
[15:02] <indranil> sampablokuper: say you have the default WP structure
[15:02] <indranil> "home" is the blog index
[15:02] <indranil> which uses the home.php as it's own template.
[15:02] <indranil> think of home.php as the blog index's template
[15:02] <indranil> not WP's
[15:02] <indranil> now, when you set "home" to a page
[15:02] <indranil> the page uses page-something.php or it's own template to template itself
[15:03] <indranil> the blog index as the home doesn't surface anymore...
[15:06] <sampablokuper> indranil, you say, '"home" is the blog index'. To me, that's a bug. Home should be the home (root) page of the WP site, regardless of whether that page displays a list of blog posts or static content or whatever. In other words, if my WP site is hosted at www.mydomain.com, the home page is what a user sees when she visits www.mydomain.com . This is the standard meaning of "home page", is it not?
[15:07] <indranil> yes, but when you change the behaviour to use a page, you also change the "home" pointer, and for compatibility or something, home.php means the specific blog index..
[15:11] <sampablokuper> indranil, 'and for compatibility or something'... that's the bug: there's actually no need for it to behave this way. An alternative, and better, behaviour would be for home.php to be called when the site's home (front) page URL is accessed. And indeed, this is how the template hierarchy describes it.
[15:13] <indranil> the template hierarchy describes it when the blog index is the front page. that the blog index is still WP's first love as home is possibly a bug
[15:16] <sampablokuper> indranil, 'the template hierarchy describes it when the blog index is the front page.' I guess it does, but it doesn't make this explicit (AFAICS). It just assumes that home page = blog index, which is an increasingly false assumption now that WP is becoming more widely adopted as a general purpose CMS.
[15:17] <indranil> sampablokuper: yes. that fact that WP can change home page is a fairly new thing, and it'll catch on I'm sure...
[15:19] <RandyWalker> indranil: fairly new? O_o
[15:19] <indranil> RandyWalker: isn't it?
[15:19] <indranil> what was it 2.5?
[15:19] <indranil> that's also new!
[15:19] <RandyWalker> it was before that, IIRC
[15:20] <indranil> hmm
[15:22] <sampablokuper> indranil, RandyWalker, I think it might have been 2.1: http://trac.wordpress.org/ticket/7715
[15:26] <sampablokuper> indranil, I've found a bug report along the lines I was thinking (though it proposes a different solution: http://trac.wordpress.org/ticket/6801
[15:27] <indranil> it's been bumped from 2.5.1 to 2.8.. you can hope it gets tested..
[15:29] <sampablokuper> indranil, yes, I noticed that. I'm using 2.7, but I'm glad a fix is in the pipeline.
[15:30] <indranil> sampablokuper: unfortunately, it's been in the pipeline from 2.6
[15:30] <indranil> hopefully it'll get rectified this time
[15:31] <sampablokuper> indranil, yes, it's sure taking a while to be addressed. I'll see if I can post something helpful to the bug report to add my insights (if they can be called that). Thanks for your help! :)
[15:31] <indranil> sampablokuper: no problems. yes, you should add that, and maybe even open a forum thread asking for it to be added..
[15:34] <sampablokuper> indranil, yes, I was thinking about linking it to the forum too. I'll certainly mention it in the thread I was posting to, but since that one's marked "resolved" when in reality there's an open bug about this issue, perhaps I ought to open a new thread. I'll give it some thought :)
[15:34] <indranil> open a new thread definitely...
[15:34] <indranil> [resolved] tags don't get much love from mods :)
[15:36] <sampablokuper> indranil, RandyWalker, I notice that #wordpress doesn't seem to have published logs. Would you object to my publishing our conversation on the web, either on my own blog or in a forum post? I think it might be helpful background (in addition to the bug report I found, etc) for people to understand the issue.
[15:37] <RandyWalker> we had a conversation? :)
[15:37] <RandyWalker> go for it
[15:37] <sampablokuper> Random, ty
[15:37] <indranil> RandyWalker is hogging the glory!
[15:37] <sampablokuper> s/Random/RandyWalker/
[15:37] <indranil> RandyWalker: didn't this place have logs?
[15:37] <indranil> long long back!
[15:39] <sampablokuper> indranil, indeed ;) but would you mind if I published a log of our convo above?
[15:39] <sampablokuper> If you'd prefer I didn't, that's ok.
[15:39] <indranil> sampablokuper: not at all! go right ahead!
[15:39] <indranil> lol not at all.. publish at will
[15:39] <sampablokuper> indranil, cool. Thanks again :)
[15:39] <indranil> sampablokuper: and open a forum thread to get the attention :)
[15:42] <sampablokuper> OK, I'm off to get on with this. Thanks for the help, folks!
[15:42] Disconnected (2009-01-04 15:42:12)

One Response to “Woepress”

  1. sampablokuper says:

    It seems that others are starting to express agreement with me. Still, actually doing something about it has been put off by the devs for the time being.

Leave a Reply

You can use Markdown syntax and Markdown Extra syntax in this box.