Project

General

Profile

Actions

Bug #104734

closed

Indexed search PHP Error Undefined array key in SearchController.php line 264

Added by Guido Twieling about 2 months ago. Updated 5 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
Start date:
2024-08-26
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.2
Tags:
php error indexed search
Complexity:
Is Regression:
Sprint Focus:

Description

Hello.
I have integrated a search field into the main navigation in typo3 13.2.1. The link that is generated when the search is submitted is correct but I get a crash. I have attached the log file and the template.


Files

typo3_11f96f4e3a.log (16.7 KB) typo3_11f96f4e3a.log Guido Twieling, 2024-08-26 08:07
Search.html (643 Bytes) Search.html Guido Twieling, 2024-08-26 08:11

Related issues 1 (0 open1 closed)

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

Actions
Actions #1

Updated by Guido Twieling about 2 months ago · Edited

After adding

if (!isset($searchData['pointer'] )) {
$searchData['pointer'] = 0;
}
to SearchController.php line 263 it works.

Actions #2

Updated by Guido Twieling about 2 months ago

  • Target version changed from 13 LTS to 13.3
Actions #3

Updated by wini2 no-lastname-given 29 days ago

I'm using the same scenario like you. Unfortunately the change hasn't made it to the core in 13.3. Could you please be so kind to describe what to change (for a dilettante like me).

$paginator = new SlicePaginator(
$result['rows'],
((int)$searchData['pointer']) + 1,
$resultData['count'],
$searchData['numberOfResults'],
);
$result['pagination'] = new SimplePagination($paginator);
}
// Print a message telling which words in which sections we searched for
if (str_starts_with($searchData['sections'], 'rl')) {
$result['searchedInSectionInfo'] = (LocalizationUtility::translate('result.inSection', 'IndexedSearch') ?? '') . ' "' . $this->getPathFromPageId((int)substr($searchData['sections'], 4)) . '"';
}

After uptdating from 13.2 to 13.3 I noticed that the search sometimes works (around 20 % ), the other 80 % end up with the described error.

Actions #4

Updated by Benjamin Franzke 13 days ago

  • Status changed from New to Accepted
Actions #5

Updated by Gerrit Code Review 13 days 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/+/86449

Actions #6

Updated by Benjamin Franzke 13 days ago

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

Updated by Benjamin Franzke 13 days ago

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

Updated by Benni Mack 5 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF