Project

General

Profile

Actions

Bug #104861

closed

Indexed Search - total number of results don't shown up (TYPO3 13.2)

Added by wini2 no-lastname-given 2 months ago. Updated 29 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2024-09-09
Due date:
% Done:

100%

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

Description

Even if displayResultNumber is set to 1, the it only shows up

Anzeige der Ergebnisse 11 bis 12 von insgesamt


Related issues 4 (2 open2 closed)

Related to TYPO3 Core - Feature #105084: Indexed_search PaginationNew2024-09-22

Actions
Related to TYPO3 Core - Feature #88597: Indexed_Search: Improvement suggestionsNew2019-06-19

Actions
Related to TYPO3 Core - Task #102925: Indexed Search: Migrate rating to ViewHelperClosed2024-01-25

Actions
Related to TYPO3 Core - Task #102945: Replace custom Indexed Search pagination with existing APIClosed2024-01-26

Actions
Actions #1

Updated by Garvin Hicking 2 months ago ยท Edited

  • Status changed from New to Needs Feedback
Actions #2

Updated by wini2 no-lastname-given 2 months ago

changing

<f:render partial="Searchresult" arguments="{row: row, searchParams: searchParams, firstRow: firstRow}" />
in search.html
to
<f:render partial="Searchresult" arguments="{row: row, searchParams: searchParams, firstRow: firstRow, settings: displayResultNumber}" />
<f:render partial="Searchresult" arguments="{row: row, searchParams: searchParams, firstRow: firstRow, settings: settings.displayResultNumber}" />

doesn't help. Could it be, that displyResultNuber is the newly feature to show the number of the result inside the actual result (at the position where the type-icon has been in prior versions)?

Actions #3

Updated by Garvin Hicking 2 months ago

  • Status changed from Needs Feedback to Accepted

Yes, I can reproduce this. The Pagination API in this case is IMO broken, probably due to the use of the `SlicePaginator`.

The pagination uses:

{result.pagination.startRecordNumber} - {result.pagination.endRecordNumber} of {result.pagination.totalAmount}.

However, the key totalAmount does not exist as part of the PaginationInterface, but is a property of the paginator which is accessible via the getTotalAmountOfItems method. However, the SimplePagination class does not provide a pass-through of that protected paginator's method, so it cannot be retrieved.

Actually, the endRecordNumber should hold the maximum amount of items in this case, but instead only returns the number of items inside the current slice.

I don't know how to retrieve the totalAmountOfItems actually, since it's gated by protected getters and not revealed to the outside.

We either need to make this accessible, or we need to adjust the indexedSearch pagination display so that no longer it says "items 1-10 of 25" but instead "show items 1-10 on 1 of 4 pages" or so. One will not now the total amount of results then, but at least the number of pages. :D

Actions #5

Updated by Garvin Hicking 2 months ago

The problem is, getAllPageNumbers() only shows the number of maximum PAGES, not the amount of total ITEMS.

When you have 10 items per page and 9 pages, you could have 91 results or 100.

Actions #6

Updated by Garvin Hicking about 1 month ago

Actions #7

Updated by Garvin Hicking about 1 month ago

  • Related to Feature #88597: Indexed_Search: Improvement suggestions added
Actions #8

Updated by Mogens Fiebrandt about 1 month ago

I can also reproduce this in TYPO3 13.4.0.

As a workaround i did override the Search.html template and changed line 34.
From:

<f:translate key="displayResults" arguments="{0: result.pagination.startRecordNumber, 1: result.pagination.endRecordNumber, 2: result.pagination.totalAmount}" />

To:
<f:translate key="displayResults" arguments="{0: result.pagination.startRecordNumber, 1: result.pagination.endRecordNumber, 2: result.count}" />

Actions #9

Updated by Garvin Hicking about 1 month ago

  • Related to Task #102925: Indexed Search: Migrate rating to ViewHelper added
Actions #10

Updated by Garvin Hicking about 1 month ago

  • Related to Task #102945: Replace custom Indexed Search pagination with existing API added
Actions #11

Updated by Gerrit Code Review about 1 month ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86704

Actions #12

Updated by Gerrit Code Review 29 days ago

Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86742

Actions #13

Updated by Garvin Hicking 29 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF