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.

CommentFileSizeAuthor
#1 activity-758284.patch2.75 KBmanarth

Comments

manarth’s picture

Version: 6.x-1.x-dev » 6.x-1.2
StatusFileSize
new2.75 KB

This 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.

manarth’s picture

Status: Active » Needs review
sirkitree’s picture

This 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.

sirkitree’s picture

Status: Needs review » Closed (won't fix)

closing. 1.x no longer supported.