teaminmedias-pluswerk / 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
35 stars 62 forks source link

Filters options deleted after create or edit category #418

Closed junfan59 closed 2 years ago

junfan59 commented 3 years ago

Hello, All is in title. When we create or delete a category (not necessarily used for filter option), many filters options are deleted (not all, maybe the last created only but not sure).

Nothing into log, nothing into history. Like filters options never exist or like an external script make a delete into database.

TYPO3 version used : 9.5.23 ke_search version : 3.4.2

Any help is welcome. Thanks

christianbltr commented 3 years ago

Are only filter options with the "syscat" prefix are affected or all filter options?

Since Version 3.2.0 does automatically create filter options for system categories and deletes them if necessary.

See also https://docs.typo3.org/p/teaminmedias-pluswerk/ke_search/master/en-us/Filters/SystemCategories.html#notes

But only filter options using the tag "syscat" + ID should be deleted.

Did you manually create filter options with the "syscat" prefix?

It is possible that ke_search will delete those when you update system categories.

If this is the case I would propose to select a filter in the "Search" tab of system categories. Then the filter options will be connected to system categories and won't be deleted anymore.

Maybe it should be stated more clearly in the documentation that if you used ke_search below 3.2.0 and manually created filter options with the "syscat" prefix the will be deleted in current versions if they are not connected to system categories. Or maybe it should be possible to turn off the feature in the extension settings.

For reference: Deleting filter options takes place here:

https://github.com/teaminmedias-pluswerk/ke_search/blob/0d3870b606af67e5acc0a4fbb10b7502adc42f1c/Classes/Hooks/FilterOptionHook.php#L119

and here:

https://github.com/teaminmedias-pluswerk/ke_search/blob/0d3870b606af67e5acc0a4fbb10b7502adc42f1c/Classes/Hooks/FilterOptionHook.php#L69

christianbltr commented 2 years ago

I'm closing this. Feel free to open another issue at https://github.com/tpwd/ke_search/issues if the issue still still occurs and if it is not related to the mechanism of "syscat" categories being created and deleted as described above.