« SubCategories version 0.2 | Main | Optional-Redirect v0.1 »
January 19, 2004
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!
Posted by rayners at January 19, 2004 09:05 PM
Trackback Pings
TrackBack URL for this entry:
http://mt.rayners.org/mt-tb.cgi/269
Comments
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
Posted by: David at January 20, 2004 08:40 PM
This happens when the categories are not continuous numbered. Quick fix for this: append if(defined $cat) to line 60.
Posted by: b.gr at January 21, 2004 05:08 PM
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.
Posted by: David at January 21, 2004 05:53 PM
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?
Posted by: Rachel Cunliffe at March 11, 2004 12:26 AM
Error: Can't call method "label" without a package or object reference at plugins/sub_cats.pl line 69. what can I do?
Posted by: Strivectin SD at April 27, 2004 08:11 AM
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.
Posted by: Veer Kothari at March 13, 2005 06:06 AM
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.
Posted by: David at January 20, 2004 08:19 PM