Project

General

Profile

Actions

Bug #86994

closed

indexed_search doesn't index pages using route enhancers

Added by Alexander Grein over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2018-11-25
Due date:
% Done:

100%

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

Description

To reproduce:
  1. Activate EXT:indexed_search
  2. Take any extension with a list and a show action (e.g. news) and add some records. The actions should be cached.
  3. Generate a simple page
  4. Add the frontend plugin with list/show action to it.
  5. Define a site configuration for the page
  6. Add a routeEnhancers of type "Extbase" definition for the show action of the choosen extension plugin
  7. Open a different browser than you are logged in into the backend (or use an incognito/private tab) and open the list page of the plugin
  8. Navigate to all detail pages (show action) of your generated records
  9. Open the page containing the frontend plugin of indexed_search
  10. Search for a word in your records

Expected:
A search result with all detail pages containing the search term with correct links to there detail page

Actual result:
  • Only words from the first opened detail page are found
  • The link to the detail page is not working

After debugging the hook_indexContent method of TYPO3\CMS\IndexedSearch\Indexer, the reason seems to be clear:
$pObj->cHash and $pObj->cHash_array are emty

Because of this, the following code think it's always the same page and only looks at the time of last indexing.

I build a small fix for myself to get the missing params from different places, but this could definitily not be the final solution.

Add this after line 306

if ($pObj->cHash === null && count($pObj->cHash_array) === 0 && count($pObj->pageArguments->getArguments()) > 0) {
    // Fix for missing cHash and cHash_array
    $queryParams = $pObj->pageArguments->getArguments();
    $queryParams['id'] = $pObj->id;
    $cacheHashCalculator = GeneralUtility::makeInstance(CacheHashCalculator::class);
    $pObj->cHash_array = $cacheHashCalculator->getRelevantParameters(HttpUtility::buildQueryString($queryParams));
    $pObj->cHash = $cacheHashCalculator->calculateCacheHash($pObj->cHash_array);
}

With this piece of code indexing of detail pages and also detail link generation in the search result works again.

One thing which is still not woking, is the (correct) page title generation (indexedDocTitle):
Titles generated by the page title api will be ignored.
But may be this is another issue ...


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #87855: Indexed_search problem if sql_mode have option ONLY_FULL_GROUP_BY enabledClosed2019-03-07

Actions
Precedes TYPO3 Core - Bug #89081: PHP Warning in Backend Module Indexing -> List: PagesClosed

Actions
Actions #1

Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

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

Actions #2

Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58983

Actions #3

Updated by Gerrit Code Review over 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58983

Actions #4

Updated by Gerrit Code Review over 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58983

Actions #5

Updated by Gerrit Code Review over 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58983

Actions #6

Updated by Gerrit Code Review about 5 years ago

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

Actions #7

Updated by Gerrit Code Review about 5 years ago

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

Actions #8

Updated by Gerrit Code Review about 5 years ago

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

Actions #9

Updated by Gerrit Code Review about 5 years ago

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

Actions #10

Updated by Gerrit Code Review about 5 years ago

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

Actions #11

Updated by Gerrit Code Review about 5 years ago

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

Actions #12

Updated by Gerrit Code Review about 5 years ago

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

Actions #13

Updated by Gerrit Code Review about 5 years ago

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

Actions #14

Updated by Gerrit Code Review about 5 years ago

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

Actions #15

Updated by Gerrit Code Review about 5 years ago

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

Actions #16

Updated by Gerrit Code Review about 5 years ago

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

Actions #17

Updated by Alexander Grein about 5 years ago

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

Updated by Gerrit Code Review about 5 years ago

  • Status changed from Resolved to Under Review

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

Actions #19

Updated by Alexander Grein about 5 years ago

  • Status changed from Under Review to Resolved
Actions #20

Updated by Georg Ringer about 5 years ago

  • Related to Bug #87855: Indexed_search problem if sql_mode have option ONLY_FULL_GROUP_BY enabled added
Actions #21

Updated by Jonas Schwabe almost 5 years ago

One thing which is still not woking, is the (correct) page title generation (indexedDocTitle):
Titles generated by the page title api will be ignored.
But may be this is another issue ...

FYI: I didn't find an open issue for this, so I created one and added a patch: #88041

Actions #22

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions #23

Updated by Oliver Hader over 4 years ago

  • Precedes Bug #89081: PHP Warning in Backend Module Indexing -> List: Pages added
Actions

Also available in: Atom PDF