CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #27389

pagebrowser in bloglist widget / categories widget: Number of posts is wrong

Added by Hauke Hain almost 2 years ago. Updated 11 months ago.

Status:New Start date:2011-06-12
Priority:Must have Due date:
Assignee:- % Done:

0%

Category:Bug
Target version:-
Votes: 2 (View)

Description

Since r41983 the blog entries won't be shown more than once. As a matter of fact the categories widget was not adjusted like that. So it still shows the number of blog posts the t3blog blogList widget showed before r41983 (too many).

The widget bloglist has the same problem. The number of shown posts is used by the pagebrowser. As a result there could appear links to pages, that cannot show any blog posts.


Related issues

related to T3BLOG - Bug #47055: Wrong paging with t3-blog search Resolved 2013-04-08

History

Updated by Kevin 11 months ago

I don't know for sure if this is the same issue, but the function getNumberOfListItems in t3blog/pi1/widgets/blogList/class.listFunctions.php seems to be missing a DISTINCT clause in the COUNT query. As a result it also counts duplicate items, while the getListItems function is only selecting DISTINCT items. I think this is simply solved by changing

'COUNT(tx_t3blog_post.uid) AS t'

to

'COUNT(DISTINCT tx_t3blog_post.uid) AS t'

In my case a search from the searchbox widget broke the pagebrowser, because the number returned from getNumberOfListItems() was too large.

Also available in: Atom PDF