June 10, 2006

Find that bug …

I’ve been working a lot on Blog the last few days but I’ve hit a brick wall again 🙁 I’ve done a lot of minor interface tweaks that I think will be pretty useful but then I wanted to do one major interface change – have categories be listed under different remote blogs. The reasoning is simple. Currently, the way the category system is set up, all categories are displayed as one big list. The problem is, that when you have multiple remote blogs, after a while it becomes difficult to figure out which category belongs to which remote blog. So I thought that I’d change the category display to a treeview where each branch represented a different remote blog. Unfortunately, things weren’t that simple :p

Or rather, the implementation is indeed that simple but getting there is not. And it has nothing to do with categories. Instead, it has everything to do with version number changes. Blog, as you might know, has been stuck in 8.0 beta for a few years now. I work on it when I can but a version number is bumped up only when a database change is required. At the moment, there are a couple of database changes that need to be made – one to add a table to hold the relationship between remote blogs and categories and another to remove the More column from the entries table because I decided to have the full entry in one database column. It is the second change which is posing a problem.

In order to combine the More column and the Entry column, I was going to use a comment, <!–more–>, which would replace the standard <$BlogMore> tag. This was supposed to be an easy and quick workaround since WordPress at least supports the <!–more–> tag out of the box and treats it as an entry break. However, it turns out that the HTMLEdit component has a strange bug where it strips out HTML comment tags on a second save. Not the first save mind you, but the second save. The comment tag gets saved to the DB fine on the first save and is loaded from the DB fine after that but if you save the entry again, the tag disappears without a trace.

I asked over at the HTMLEdit component author’s newsgroups about this but soon after, his whole site became inaccessible :p So now I’ve been contemplating wading into his source code to see what is going on but it looks like a major job and I’m not certain that I really want to get into it. But I might have no other choice …

Be Sociable, Share!
Tags: Blog, Coding
Posted by Fahim at 6:51 am   Comments (1)