SubText category id errors with Live Writer

by Dan Matthews 29. July 2008 14:11

On our blogs, we recently found we were getting this error when trying to edit some posts:

image

The id's given were occasionally different but it was always the same format...

"Could not find category id XX in the Checkbox list which has XX items."

Somehow it seems that SubText has got itself in a twist and allocated invalid category id's to the posts. I suspect that this is actually caused by a funny bug between SubText and Microsoft Live Writer. You see, when you write an article in Live Writer you can allocate the categories for it and post it up to SubText. So far, so good. However, the bug occurs when you have a Post Category and an Article Category with the same name. When the Web Service request hits SubText it might not pull out the correct category id - probably because it checks only by name and grabs the first one. The problem we were having is that some posts were getting added with a category id for an article. Changing the category name for the articles fixed the problem.

You can see if any of your posts have this problem by running the following SQL against the SubText database.

   1: select * from subtext_Content, subtext_Links, subtext_LinkCategories
   2: where subtext_Content.ID = subtext_Links.PostID
   3: and subtext_Links.CategoryID = subtext_LinkCategories.CategoryID
   4: and PostType != CategoryType

If you get rows back, then you need to tweak your data :)

Once you've fixed your data, then the main recommendation I'd make is to use different category names for posts and articles. That way, Live Writer or other Web Service based blog tools won't confuse SubText.

Tags:

Powered by BlogEngine.NET 1.5.0.7
Theme by Interakting

Interakting

A full service digital agency offering online strategy, design and usability, systems integration and online marketing services that deliver real business benefits and ensure your online objectives are met.

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar