Project

General

Profile

Actions

Bug #38326

closed

sometimes too many results listed on page

Added by Dave van Grootheest over 12 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-06-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In 4.7.1, when TS setup value plugin.tx_indexedsearch.search.exactCount is set to 1, the number of search results listed on one page is twice as many as would normally be the case. For instance, if results per page should be 10, actually 20 results are listed. (The next page does start at the right position, though.)

This behavior seems to have something to do with function getResultRows in class.tx_indexedsearch.php: if the value of $lastResultNumberToAnalyze (see line 537) is changed from
$lastResultNumberToAnalyze = ($currentPageNumber + 1) * $this->piVars['results'] + $this->piVars['results'];
to
$lastResultNumberToAnalyze = ($currentPageNumber + 1) * $this->piVars['results']
the number of results comes out right. However, I am not sure if that is the appropriate solution.

(Additional comment: when comparing the calculation of $lastResultNumberOnPreviousPage and $firstResultNumberOnNextPage in that same function getResultRows, on lines 535-536, and given how $firstResultNumberOnNextPage is used on line 582, it would seem that $firstResultNumberOnNextPage actually represents the last result number on the current page.)

Actions

Also available in: Atom PDF