Right now, the [facetapi_results:end-count] tokens is hardcoded to always return the theorical end count, which means the page number * items per page. That works fine on most pages, but you get into problems on the last one if the results count isn't a multiple of the page limit.

Attaching the trivial patch to fix this as soon as I have an issue ID to put in the commit message.

Comments

DeFr’s picture

Status: Active » Needs review
StatusFileSize
new1.07 KB
phenaproxima’s picture

I applied your patch against Facet API 7.x-1.0-rc4 and it worked beautifully for me. Thank you!

cpliakas’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense to me. Code looks good, marking this as RTBC based on the validation in #2.

Thanks for the contribution,
Chris

cpliakas’s picture

Title: Make the end-count token more meaningful » The end-count token miscalculates the value when viewing the last page in the result set
Version: 7.x-2.x-dev » 7.x-1.x-dev
Category: feature » bug

Changing title and marking as a bug report as I think that is more appropriate here.

cpliakas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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