- Posts: 133
COMMUNITY FORUM
Article count wrong
- piperchick
-
Topic Author
- Offline
- Premium Member
Less
More
15 years 6 months ago #74743
by piperchick
Article count wrong was created by piperchick
The article count in my sub-categories is incorrect.
Please see allenfamily.ca/stephanie-jocelyn
Sub-cat "Jocelyn" appears to have 50 articles but there are only 8 (and we haven't deleted a bunch that are sitting in the trash).
The 8 in the sub cat "Jocelyn" and the 42 in the sub cat "Stephanie" equal 50... coincidence?
Is there a way to do a re-count?
Please see allenfamily.ca/stephanie-jocelyn
Sub-cat "Jocelyn" appears to have 50 articles but there are only 8 (and we haven't deleted a bunch that are sitting in the trash).
The 8 in the sub cat "Jocelyn" and the 42 in the sub cat "Stephanie" equal 50... coincidence?
Is there a way to do a re-count?
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
Less
More
- Posts: 8743
15 years 6 months ago #74744
by Lefteris
Replied by Lefteris on topic Article count wrong
Hi. If you have set at the category parameters that the parent category fetches also items from it's children the counter counts also children items.
Please Log in or Create an account to join the conversation.
- Sean Proske
-
- Offline
- New Member
Less
More
- Posts: 2
15 years 4 months ago #74745
by Sean Proske
Replied by Sean Proske on topic Article count wrong
There is a bug in k2 causing item counts to be off. If you open up /components/com_k2/models/itemlist.php and go to line 385 change:
function getCategoryChilds($catid) {
static $array = array();
to:
function getCategoryChilds($catid) {
$array = array();
Remove the "static" and your counts should be correct.
function getCategoryChilds($catid) {
static $array = array();
to:
function getCategoryChilds($catid) {
$array = array();
Remove the "static" and your counts should be correct.
Please Log in or Create an account to join the conversation.
- piperchick
-
Topic Author
- Offline
- Premium Member
Less
More
- Posts: 133
15 years 4 months ago #74746
by piperchick
Replied by piperchick on topic Article count wrong
Thank you, Sean.
That was the fix I needed (and never would have found myself)!!!
That was the fix I needed (and never would have found myself)!!!
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
Less
More
- Posts: 8743
15 years 4 months ago #74747
by Lefteris
Replied by Lefteris on topic Article count wrong
Hi. This has been already fixed for the next release. Thanks for reporting.
Please Log in or Create an account to join the conversation.