About the author

Steven Harmansteven harman :: makes sweet software with computers!

For recent posts and more about me, scroll to the bottom.

Subscribe

  • Subscribe to my feed. via RSS
  • Subscribe via email via email

News

Badges

  • Subtext Project
  • Support Subtext

Subtext "Windward" Edition - SiteMap Update

Subtext v1.9.4 "Windward" officially dropped this past Sunday, and pretty quickly several users and developers pointed out that the new Sitemap implementation was some-what busted. It's never good when a new feature is broken straight out of the box.

I take full blame for the foul-up. I wasn't aware of Google's apparent requirement that the Sitemap file live as close to the root of the site as possible. So when I tried to make the HttpHandler be more specific I accidentally broke the implementations in Google's eyes.

The Fix

To fix my screw-up, I had to change the Regular Expression that Subtext's Sitemap HttpHandler uses to match a web request's URL so that it is less specific. Technically, we want to match any request where the URL ends with Sitemap.ashx.

If you're already deployed or upgraded to Subtext "Windward" you just need to make one small tweak to your web.config file. So open your web.config file, and find the <HandlerConfiguration> section, make sure that the entry for the Sitemap looks like this:

<HttpHandler pattern="(?:/Sitemap\.ashx)$" 
type="Subtext.Web.SiteMap.SiteMapHttpHandler, Subtext.Web" 
handlerType="Direct"/>

Updated Release Files

Last night I updated the release files on the SourceForge download servers so they already have the fix baked in. So in the case that you've not already upgraded and/or deployed Windward, just grab the latest copy off the download servers and you should be good to go.

Again, sorry for the foul-up... it's my bad! But hopefully the instructions in this post, and the updated release files will help to get me back in your good graces.

Technorati tags: , ,

What others are saying.

# re: Subtext "Windward" Edition - SiteMap Update
Gravatar David
Feb 17, 2007
Good fix-up of this mixup. Thanks!
# re: Subtext "Windward" Edition - SiteMap Update
Gravatar Steve Harman
Feb 17, 2007
@David: Thanks! And I'm sorry that I botched all your hard work in the first place.

Mea Culpa!
# re: Subtext "Windward" Edition - SiteMap Update
Gravatar David
Feb 18, 2007
No problem at all. I'm just glad we sorted it out.

I laughed out loud when I saw what happened. It was so typical of software development, wasn't it? First you work so hard to make things stable and 5 minutes before you do "just on more thing" that couldn't hurt anyone. But it does. It does so many times... :)
# re: Subtext "Windward" Edition - SiteMap Update
Gravatar Don
Mar 21, 2007
Hi Steve.

It might be nice to have a little info on what the sitemap stuff is supposed to do. I submitted my subtext sitemap to google and I'm getting errors like this:

"We've detected that you submitted your Sitemap using a URL path that includes the www prefix (for instance, http://www.example.com/sitemap.xml). However, the URLs listed inside your Sitemap don't use the www prefix (for instance, http://example.com/myfile.htm)."

So, are the sitemaps hard coded to not use the www prefix? Is this even a big deal?

Thanks,
Don
# re: Subtext "Windward" Edition - SiteMap Update
Gravatar Andrew
Aug 30, 2007
Hi Again,

I'm also having trouble with the sub-domain of the URLs in the sitemap. Even when requested from http://www.mysite.com all the sitemap urls are listed as http://mysite.com which contradicts the sitemap protocol , which states that a sitemap on a partcular sub domain can only include urls to pages on that same sub domain.

More the point, Google throws all of it's toys out of the cot and refuses to read the sitemap for my blog.

Is there any way to override this behaviour?

Thanks - Andrew.
Comments have been closed on this topic.