On the page where users can see their own submissions, if there are more than 50 submissions Webform displays 50 items and then at the bottom as a link to the next page (First/page 1/page 2/page 3/Last)

The results are shown in a table. Clicking on a table header will sort the results table *but* it only sorts the results on that page, not the whole data set.

For example, I have 60 submissions, and I sort the table by submission number, descending. I would expect that on the first page I would see submissions #60-11 but instead on page 1 I see 50-1 and on page two I see 62-51

Comments

dboulet’s picture

I just noticed this today as well. This is really a nasty bug because it fools users into thinking that there are only 50 submissions.

quicksketch’s picture

StatusFileSize
new1.46 KB

I found this same problem exists in the 3.x version also. I've committed a fix to 3.x with the attached patch. We might see a fix for the 2.x version next time I'm working on the previous version.

Anonymous’s picture

Thanks for looking into this so quickly!

EmanueleQuinto’s picture

StatusFileSize
new496 bytes

The attached patch (for version 6.x-2.9) appends the same sort, either tablesort_sql($header) or ' ORDER BY sid ASC' (default sorting), to the pager_query call.

dboulet’s picture

Status: Active » Needs review

Let's get that last patch reviewed.

dboulet’s picture

Tried patch in #4 on a site with 1100 submissions, and seems to work perfectly. Thanks EmanueleQuinto.

gapple’s picture

Status: Needs review » Reviewed & tested by the community

Only 68 submissions on my site, but works great.

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

Thanks EmanueleQuinto, dboulet, and gapple for creating the patch and testing. Committed to 2.x branch.

AlexisWilke’s picture

Cool! This fixes my problem... I noticed today that I could not see my last submission. It looked like everything was sorted right, but the pager was not and thus the last submission was on another page... and not the last page! (Note that I'm using PostgreSQL and thus the data in the tables are often in a quite random order contrary to MySQL.)

Anyway... this was the fix. 8-)

Thank you.
Alexis

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.