I sometimes set the message for an activity to be blank - usually to surpress the message for a particular role.
When I do this, the pager(for example, at activity/mine) gives incorrect results.
This is because the db query finds all matching activities, but the activities without a corresponding message are hidden in the themeing layer. The paginator comes from db_pager_query, so isn't aware that some rows are not shown.
The result is that the page may show less than n rows page (where n is the activity_page_pager variable), and the pager may show more pages than actually can be viewed.
Comments
Comment #1
manarth commentedThis patches feels a little ugly!
If adds an extra optional param to activity_get_activity, to restrict the results to only those with a corresponding message. It does this by doing an inner-join on the variable table.
It also changes the calls in activity_page to make use of this parameter.
The patch is functional, but may not be the best way to solve the problem...Might be worth thinking of alternative approaches for the 6.x.2.x code.
Comment #2
manarth commentedComment #3
sirkitree commentedThis is actually fixed in 2.x - but thank you for the patch.
maintenance on 1.x is pretty much null, so i'd suggest using 2.x which is actually quite functional and has many of the 1.x bugs worked out.
Comment #4
sirkitree commentedclosing. 1.x no longer supported.