[Looking for Charlie's main web site?]

Bloggers: validate your feed on new entries, or you and your readers could suffer. Here's how

Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Have you ever found (as a blogger or as a reader of a blog's feed) that sometimes it seems the feed just seems to stop working? It could be that it's become invalid. Here's a tip.

Bloggers: you really should validate your feed on every new submission. You never know when some special character you used (or copy/pasted from elsewhere) might make your feed invalid.

In this entry, I propose a couple of possible solutions, either that you may find or that you can easily add to your own blog.

Validating your feed. Does your blogging tool do it?

I imagine some blogging tools may even offer this as a feature. It's easy enough to validate one's feed with a tool like http://feedvalidator.org/. You can easily validate your own by adding your URL with http://feedvalidator.org/check.cgi?url=yoururl. (Technically, the value of yoururl should be URLEncoded.)

Validating it yourself on each new entry

If your blogging tool doesn't do that validation for you, here's another thought: you could easily do it yourself. Here's code I use to check the feed whenever a new entry is made. It looks at the validation result and sends me an email if it fails, which has saved my bacon a couple of times:

<cfhttp url="http://feedvalidator.org/check.cgi?url=#urlencodedformat("http://carehart.org/blog/client/rss.cfm?mode=full")#" resolveurl="Yes">

<div id="content">

<cfif cfhttp.filecontent does not contain "congratulations">
   <cfmail to="myemailaddress" from="myemailaddress" subject="Your Blog's RSS feed has failed" type="HTML">
      <p><a href="http://feedvalidator.org/check.cgi?url=#urlencodedformat("http://carehart.org/blog/client/rss.cfm?mode=full")#">http://feedvalidator.org/check.cgi?url=#urlencodedformat("http://carehart.org/blog/client/rss.cfm?mode=full")#</a></p>
#cfhttp.filecontent#
   </cfmail>
   <cfoutput>
      <h4>Validation Failed</h4>
      For http://carehart.org/blog/client/rss.cfm?mode=full. Email sent to myemailaddress.
      <p><a href="http://feedvalidator.org/check.cgi?url=#urlencodedformat("http://carehart.org/blog/client/rss.cfm?mode=full")#">http://feedvalidator.org/check.cgi?url=#urlencodedformat("http://carehart.org/blog/client/rss.cfm?mode=full")#</a></p>
   </cfoutput>
<cfelse>
   <cfoutput>
      <h4>Validation passed.</h4>
      For http://carehart.org/blog/client/rss.cfm?mode=full passed.
   </cfoutput>
</cfif>
</div>

Of course, you could just drop that code into your blogging code if you're comfortable doing that.

Using your blog tool's Ping feature

But if you don't want to edit your blogging code, you could do this just as easily with your blogging tool's ping feature, if it offers one. These are more typically used to provide one or more URLs which the blogging tool will call when you offer a new entry, such as to notify blog aggregators of your new entry (rather than waiting for them to come back to find your entry eventually).

You could use that same feature have it go to a URL on your own site that runs the code above. That's what I do.

Is there a service doing this already?

I suppose someone could set up a service to do this, letting you pass in the URL and email addresses. For now, I'm not in a position to do that on my own server for others. One would need to be careful not to let this be abused in any way. I also imagine it could get used by a lot of folks.

I kind of wonder why some free service hasn't yet been created to do this. Surely someone could find a way to monetize it. :-)

Anyone know of such a tool?

Anyway, there's the idea and the code above, if it may help.

PS: This is more than just for bloggers

BTW, this applies to more than just blogs. Anything where you add items that offer an RSS feed to read them, this would make sense, such as podcasts, news items, and more.

In fact, I've been meaning to write this entry for a long time, and was actually motivated when I came across some failing OPML for one of the CF blog aggregators today. I dropped a note to the owner, letting him know that someone had slipped in a bad character when they'd entered a new feed to him. I suggested he could benefit from this idea (as would others), and that I'd blog about it. There you have it.

CF 8.01 includes licensed technology. Things that make you go hmm.

Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
I happened to notice today that the 8.01 release notes end with this reference: "Portions include technology used under license from Autonomy", and later it lists "TVirtualStringTree". These made me wonder: who/what were Autonomy and TVirtualStringTree?

I did a little digging, and hadn't seen anyone else write about these (it seems) in the CF blogopshere, so I'll share what I found. They're nothing dramatic.

Autonomy=Verity

In the first case, I guess I just missed the news, but back in 2005, Autonomy acquired Verity. (Seems like the acquisition last month of MySQL by Sun. Doesn't appear to have been too significant in the grand scheme. The tools continue to be known by their former company names.) Also, more digging found that this had been mentioned in the 8.0 release notes as well, but I just hadn't noticed it. FWIW, there was no mention in the CF7 notes/docs that I could see.

TVirtualStringTree in Report Builder?

What about TVirtualStringTree? Well, that isn't as obvious. It appears to be a Delphi component, and the only thing I can think of that's written in Delphi that might have been updated for 8.01 would be the CF Report Builder. Perhaps Dean Harmon or someone else from Adobe can confirm that guess. It's not important, of course.

Just one of those "things that make you go hmm" (to the younger folks out there, that's a reference to a bit from the old Arsenio Hall show of the early 90s. Gosh, now I know how my parents must have felt when they'd talk to me about the the Jack Parr show, when I was a teen in the 70's!)

PS: Searching the CF blogs

BTW, I said I hadn't seen any mention of this in the CF blogosphere. Was I going only on my memory? Heavens, no. I don't at all claim to have read most (or even 10%) of all many, MANY blogs out there on CF. It's great that there are so many, and that we have so many CF blog aggregators. But even then, none let you search all the past blog entries (at least it seems to me, as I searched for some text on that entry in all the aggregators and none found it).

So how does one do a quick search of most CF blogs? Well, last year I created a Google Custom Search Engine I call CFSearch. It lets me (and you)search only CF-related blogs and other resources. There are other CF CSEs out there, and I wrote about them back when I created mine.

I make a bookmark link for my CSE so that I can do such a search easily. Hope you'll consider doing the same.

Copyright ©2024 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting