SubCategories version 0.2.1

This is just a minor bug-fix release. SubCategories should now correctly recognize the category when it is used in a category archive template.

Enjoy!

8 Comments

I get the following error upon rebuilding any index with <MTEntriesWithSubCategories category="name">:

Can't call method "label" without a package or object reference at plugins/sub_cats.pl line 64.

This appears to be a bug: I can't have two different weblogs which use the same name for parent categories but have different subcategories.

e.g.

Blog1: Photos --> Family

Blog2: Photos --> Nature

This happens when the categories are not continuous numbered. Quick fix for this: append if(defined $cat) to line 60.

I wasn't quite sure exactly where you meant to put if(defined $cat). This is what I tried:

push @{$children{$parents{$id}}}, if(defined $cat);

but it results in empty output so I have put back the original sub_cats.pl file.

I deleted all the SubCategories entries from mtplugin_data and redefined them across all my blogs.

I can't reproduce the error I described in my first comment above -- now I have a different but related problem.

I have two weblogs, both of which have the category 'Photos'.

Weblog 1 has these subcategories assigned to 'Photos': 'Parties', 'Holidays', 'Nature'.

Weblog 2 so far has only one subcategory of 'Photos', namely 'Holidays'.

When I try to rebuild the Weblog 2 index which uses the container tag <MTEntriesWithSubCategories category="Photos">, the error I get is:

Build error in template 'Category: Photos': Error in <MTEntriesWithSubCategories> tag: No such category 'Parties'.

If I rename 'Photos' to say 'Photographs' in Weblog 2, the page rebuilds without error.

Hi,

I'm also getting this error:

Can't call method "label" without a package or object reference at plugins/sub_cats.pl line 67.

Any ideas?

I do agree with -b.gr- (message no.3).

Error: Can't call method "label" without a package or object reference at plugins/sub_cats.pl line 69. what can I do?

When using MTEntriesWithSubcategories, if there are no subcategories in any one category, the script fails for all subsequent categories in alphabetical order.


e.g.: If I have the following structure:

Category 1 (no articles)

-- Category 1.1 (a few articles)

Category 2 (a few articles)

Category 3 (no articles)

-- Category 3.1 (a few articles)

-- Category 3.2 (a few articles)

Category 4 (a few articles)


The tag shows a proper list of articles for Category 1 and Category 2, but not for categories 3 or 4.


I was wondering if this can be fixed fast. I can't create dummy sub-categories because some of my other templates do different things if there are no subcategories.


Thanks.

Leave a comment

Recent Entries

  • Plugin Writing 101

    So, I’m planning on writing up some entries about various aspects of plugin development. While I have a couple topics already in mind, I thought...

  • The Olympics Make Me Want To Compete Again

    Every time the Olympics come around (most the summer ones) I always start to delude myself into thinking I could complete once again in the...

  • Minimalist plugins are fun!

    Last night I whipped up one of the smallest plugins I’ve ever written. It is so small in fact that I was able to stuff...

  • Feedburner Widget on MT News

    Movable Type News A WordPress 2.5 Upgrade Guide: And of course there are lots of third-party plugins for the MT dashboard, to integrate statistics and...

  • AD&D Monster Stats for the Presidential Canditates

    Charles Stross (scifi author, D&D nerd, and former perl columnist) posted Politics as she is Played with 3d6: The recent death of Gary Gygax, who...

Close