tpwd / ke_search

Search Extension for TYPO3 Content Management System, including faceting search functions.
https://extensions.typo3.org/extension/ke_search/
GNU General Public License v3.0
6 stars 31 forks source link

FilterOptionHook::updateFilterOptionsForCategoryAndSubCategories called with string #224

Open luzat opened 3 months ago

luzat commented 3 months ago

On TYPO3 11.5.35 and PHP 8.1 with EXT:ke_search from at least 5.3.0 to 5.4.1 I get the following error when trying to create/save a new category in the backend:

Tpwd\KeSearch\Hooks\FilterOptionHook::updateFilterOptionsForCategoryAndSubCategories(): Argument #1 ($categoryUid) must be of type int, string given, called in ***/typo3conf/ext/ke_search/Classes/Hooks/FilterOptionHook.php on line 60 | TypeError thrown in file ***/typo3conf/ext/ke_search/Classes/Hooks/FilterOptionHook.php in line 92.

Casting the $recordUid in the call from processDatamap_afterDatabaseOperations works for me.

christianbltr commented 2 months ago

Unfortunately I could not reproduce this issue.

I tried it with the same setup (TYPO3 11.5.35, PHP 8.1, current ke_search master).

When I create a new category the $recordUid is indeed a string, but replaced into an integer in the next step by looking it up in $parentObject->substNEWwithIDs

ke_search/Classes/Hooks/FilterOptionHook.php

Auswahl_081

Auswahl_082

When I save an existing category, the $recordUid is an integer right away.

Auswahl_083

Could you show what value you are getting and maybe give some hints on how to reproduce this?