Monday, May 27, 2019

A template drama

Most bloggers use a ready-written piece of software called a template to do various things for them -- such as specify different colours in different places on the blog and inserting paragraph breaks when converting a piece of text into html.

I was doing a bit of updating (inserting "lost" links and graphics) on this blog last night when disaster struck.  I accidentally hit some really dastardly key combination which made about half of this blog invisible.  I don't know what the key combination was and I am not game to attempt recreating it

At any event, the problem probably lay somewhere in the template so I reloaded it.  That did not fix anything.  So I thought:  There's many thousands of templates on the net.  I will just grab and load a new one.  So I had a look at the current offering from and did find one I liked.  I loaded it and everything looked fine.  The "lost" posts all came back.

Then I noticed something:  There were no dates given for any post.  I had a blog full of  maybe a thousand undated posts.  That was of course hopeless.  So I tried another half a dozen different templates.  I was time consuming but I found in the end that they all had that fault. None of them would display any dates.  So I gave up that approach.

It did make me wonder if the dates were still anywhere there in the basic html code for the blog.  I looked at that and  the dates were still there.  So it seemed that the templates just could not read the dates for some reason.  One explanation occurred to me.  The alternative templates I had been loading were all recently constructed.  My damaged template, by contrast was quite old -- from 2004.

So it seemed likely that my old template had been storing dates in a format not now allowed.  So I would need to find another old template for the dates to appear.  But where would I find one of those?  Nobody bothers with old templates now.  All the ones available are fairly new compositions.  Fortunately, I had an ace.  The template I use on all my other blogs is also quite old.  I loaded that template into this blog and all problems disappeared.  The blog now looks different but the content is the same.

The whole problem-solving challenge did however really wind me up -- so I didn't get to sleep until 2am in the morning