...more recent posts
Always something.
Jim Louis' page alerted me to yet another bug in the system. This one is caused by a change in the new system that is otherwise quite good. Here's the background if you're interested:
In the old system if you deleted a post (or a whole page!) it was actually deleted. I thought that this was not such a good idea, as accidently erasing something (especially a whole page) would result in really losing the data. In the new system I protect against this by not actually deleting anything. When you tell the system to delete something it just sets a delete field in the database so that the system recognizes that that post (or page) has been deleted. But all the info is still in there. Eventually I'll build a trash can system so that you can go back into the trash and resurrect deleted items. This is a good thing (I was especially scared about one of our accounts being compromised and the evil-doer having such easy access to erasing everything.)
Anyway, the probelm was that when paging back or forward (using the '...more recent posts' and 'older posts...' links) the system looks to see how big the window is for the page (the number of posts set in [editpage] for 'number of posts shown on page') and then grabs that many posts either forward or back from where the surfer is. This works fine unless there are deleted posts in the window the system is trying to grab. This was happening on NOLA for the last day. One post on the front page, but then when you tried to go back one page, the next post had been deleted so the system would get stuck. Now I've made it smarter so that it checks for this happening and readjusts itself accordingly.
Anyway, that's probably not too interesting. But I mention it because it is another good example of how subtle problems are all but impossible to find unless your software is actually in use. There is just no way to think about every possibility in some abstract way. Only actual use will uncover bugs. In the open source / free software world they say "with enough eyeballs all bugs are shallow." Amen.
The top level [subscriptions] page now works differently. From that page you can now change the tracking of new posts and comments on multiple pages with one step. The page will list all the pages you are subscribed to, plus your current settings for tracking. Just select all of the pages you want to change to a particular sort of tracking, and then at the bottom choose the tracking style, and it will be applied to all the pages in one pass. This is a small improvement, but if you have lots of sub pages (I don't think anybody does except me) this is very necessary.
Noticed a lot of double (and triple) posts lately. I guess when the system is sluggish this happens more frequently. If you write a post, click 'post', and then nothing happens for some time it is almost always the case that the post went through, and the system is stalled while redirecting you back to the page to view your handiwork. (Why is this so? I have no idea, but this is almost always the case.)
In any case, I added a little bit to the post script so that it checks the present post against any posts you have made in the last 60 seconds. If it is identical it will alert you that it is a double post and give you a link to just take you right to the page.
I guess there might be some crazy situation where you really did need to post the exact same thing? I guess we'll talk about this if it ever comes up. Hopefully this won't be an issue. You can always just wait 60 seconds. Anyway, I hope this is a help rather than a nuisance. Let me know what you think.
Still on the trail of an elusive bug. I know this happens occasionally, but try as I might, I cannot reproduce the event under laboratory conditions. Seems like very occasionaly when deleting a post, instead of actually being deleted the post will show up a bit further back (like if you scroll back using 'older posts...' it might show up on the next page back.) This has happened to me once (I think) and to jim louis. If anybody notices anything like this please try to contact me before you do anything to fix it. I need to see an example "in the wild" to help figure out what the hell is happening. Feel free to call me on my cell if this happens. I really need to find an example of this behavior (6465263857.) Thanks.
Thanks to Steve and then the Wheel for alerting me to a rather serious problem with the [new comment] (but not the [new post]) counters. These were not working correctly under all situations. I think this is straightened out now. Let me know if you sense any other weirdness.
Seems like there is a slight problem with the new post counters in that if someone makes a post in preview mode (where only they should be able to see it) it will still register as a 'new post' for everyone (even though others won't be able to see it yet.) I thought I had planned for this, but I'll have to take a look.
There should be post and create links on the shared pages (treehouse,sustenace,artifax,sustenance) for those of you who have posting powers on those pages. I used the new page include function from yesterday to build this. I'm happy to have found the solution to this, and doubly happy that I could use the tools here to do it.
I've finished the roughed in idea for a page template system so that when [create]ing a new page you can have some preset values stored for the options in [editpage]. The idea is that if you make a lot of pages that are all similar (and all similarly different from the page defaults) you can make a template (with say, maybe, comments off, post footer off, green background, serif text, a specific copyright notice, and no search box) and then you have the option in [create] to choose that template when [create]ing a page. This saves you the effort of creating the page, and then having to go into [editpage] and change all these values by hand. Probably it's only worth it if you build mulitple pages with the same style. On the [create] page there is a link to another page where you can build a template. I haven't tested this extensively, but it seems to at least largely work.
Finally getting some work done after a few days of spinning my wheels. There are now two new features in [editpage]. The first is a checkbox labeld "turn on page includes?". Probably it is not understandable at this point, but if you check this box, then on the page (either inside a post, or inside the left-text box on [editpage]) you can enter a string like this:
[*pageinclude=/jim/weblog*]
And that whole string will be replaced with the entire contents of the page at /jim/weblog
Obviously, you could put any valid path in place of /jim/weblog.
This has a number of uses, many of which don't apply to our set up here. But who knows, maybe someone can think of a use for this. I'm using it already on some private pages (I'm building an address book for myself.) I'll write more about this later.
The second new feature on [editpage] is a request from Dave. He always has the same bits of html in every post (a headline, a blockquote, a link) and he doesn't want to type that stuff in every time. So now there is another textarea box on [editpage], this one labeled "posting template". Anything you put in this box will show up in the textarea box on [post] for all posts to that page. Again, maybe not useful for everyone, but could be handy if there is a standard way you make each post on a page.
More stuff coming, including a request from Alex to be able to choose a default on/off for the convert line breaks as well as a default template for creating new pages (font, colors, etc...)
A few hiccups this morning (between 10:00 and 11:00 am.) Nothing major, but you might have gotten an error for a minute or two. I made a pretty big update, but you shouldn't really notice anything different. Everything should be working properly now.