Issue Bug Closed

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

wini2 no-lastname-given 09/09/24, 14:01 updated 12/02/25, 14:33

Description

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

Anzeige der Ergebnisse 11 bis 12 von insgesamt

Reviews 2

History 1214

  1. wini2 no-lastname-given commented <span data-processor="relativetime" data-value="2024-09-09T16:45:42+00:00" > 09/09/24, 16:45 </span>

    changing

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

    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)?

  2. Garvin Hicking commented and changed status Needs Feedback Accepted <span data-processor="relativetime" data-value="2024-09-09T17:16:09+00:00" > 09/09/24, 17:16 </span>

    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

  3. Garvin Hicking commented <span data-processor="relativetime" data-value="2024-09-23T10:26:01+00:00" > 09/23/24, 10:26 </span>

    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.

  4. Mogens Fiebrandt commented <span data-processor="relativetime" data-value="2024-10-22T21:43:47+00:00" > 10/22/24, 21:43 </span>

    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}" />
  5. Gerrit Code Review pushed patch set 1 for main to change 86704 status Accepted Under Review <span data-processor="relativetime" data-value="2024-10-23T09:21:02+00:00" > 10/23/24, 09:21 </span>

  6. Garvin Hicking commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2024-10-25T20:10:08+00:00" > 10/25/24, 20:10 </span>

    Applied in changeset commit:dd868a232f866bdd770a0180f37c72d09cfffda9.