I've just done a host of posts for August ( been away to post them when I got back ).
I'm using the assign multiple categories plug and I've added all these with 2 Categories but the entry count next in the archive section is counting the entry twice, once for each category assigned.
Have I the plugins running in the wrong order or is this actually a bug?
www.gojamboree.org.uk/blog
1 Article, Multiple Cats, Counted Multiple Timesin Archive
1 Article, Multiple Cats, Counted Multiple Timesin Archive
"The price of greatness is responsibility."
Sir Winston Churchill
Sir Winston Churchill
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: 1 Article, Multiple Cats, Counted Multiple Timesin Archi
Hi!
Yes, this sadly is a bug in the archives sidebar plugin. It was already reported in the german section (http://www.s9y.org/forums/viewtopic.php?t=6056) - but I'm currently clueless as to how to fix it, as the complex SQL query is hard to get the count right for all 3 Databases we support and fitting them into one single query. :-/
Best regards,
Garvin
Yes, this sadly is a bug in the archives sidebar plugin. It was already reported in the german section (http://www.s9y.org/forums/viewtopic.php?t=6056) - but I'm currently clueless as to how to fix it, as the complex SQL query is hard to get the count right for all 3 Databases we support and fitting them into one single query. :-/
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
stm999999999
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact:
I glanced at this yesterday whilst waiting for a reply on my bug and istm the problem is that the archives code does a $serendipity['GET']['category'] before doing the count, which afaict isn't neccesary. (I think this causes the join to categories which you shouldn't really ever want to do in the archives plugin) So maybe just removing that bit would be enough? I didn't actually test this or anything, but might be worth investigating.
-
stm999999999
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact:
Could you not just have it go something like this?
sort order timestamp
find ( first timestamp in august )
for ( first entry in august to last entry ) {
increment archive total + 1
}
Surely it doesn't matter about the categories as the archive section is all about the number of entries between the beginning of 1 month and the next?
I'm sorry if you think I'mbeing pushy.
sort order timestamp
find ( first timestamp in august )
for ( first entry in august to last entry ) {
increment archive total + 1
}
Surely it doesn't matter about the categories as the archive section is all about the number of entries between the beginning of 1 month and the next?
I'm sorry if you think I'mbeing pushy.
"The price of greatness is responsibility."
Sir Winston Churchill
Sir Winston Churchill
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Sadly SQL doesn't work like that.
We would need to fetch ALL rows just to get the total count with your prosposed algorithm, which would vastly decrease performance.
Best regards,
Garvin
Sadly SQL doesn't work like that.
We would need to fetch ALL rows just to get the total count with your prosposed algorithm, which would vastly decrease performance.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/