I believe I've identified a bug in Moveable type.
The categories of my test blog are currently as follows (toplevel categories are: 1xyzzy, Advertising, test, test1, test2):
1xyzzy
-test2a
-testa
Advertising
-test1a
test
test1
test2
I'm using the following code to display the categories on the Front Door:
<!-- CATEGORY -->
<MTIfArchiveTypeEnabled archive_type="Category"><div class="module-categories module">
<h2 class="module-header">Categories</h2>
<div class="module-content">
<MTTopLevelCategories>
<MTIfIsDescendant parent="1xyzzy">
<MTElse>
<MTIfIsDescendant parent="Advertising">
<MTElse>
<MTSubCatIsFirst><b>UL</b><br /></MTSubCatIsFirst>
LI <MTCategoryLabel>/LI<br />
<MTSubCatsRecurse>
<MTSubCatIsLast><b>/UL</b> <br /></MTSubCatIsLast>
</MTElse>
</MTIfIsDescendant>
</MTElse>
</MTIfIsDescendant>
</MTTopLevelCategories>
</div>
</MTIfArchiveTypeEnabled>
The goal is that I want to show all of the categories except for those that are children of "1xyzzy" and "Advertising". The expected output would be:
UL
LI test/LI
LI test1/LI
LI test2/LI
/UL
The output from the above is as follows:
LI Advertising/LI
UL
LI test1a/LI
/UL
LI test/LI
LI test1/LI
LI test2/LI
/UL
That is, 1xyzzy and the categories directly below it are suppressed. "Advertising" and its children are not suppressed.
"Advertising" is a category on another of my blogs (blog_id=1).
This code works as expected on blog_id=1 but does not work on any of the other blogs on the same instance of MT.
It looks like it's not including "and category_blog_id=5" in the SQL query. (it retrieves "Advertising" from the DB. It ends up with the "Advertising" category from the other blog because it has a lower sequence number.. then the program determines that the categories aren't in the same blog and returns "false")