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
8 stars 31 forks source link

[BUGFIX] Pass $field to modifyContentFromContentElement hook #192

Closed marcharding closed 12 months ago

marcharding commented 1 year ago

I added $field to the modifyContentFromContentElement hook, because the hook is executed for each entry from tx_kesearch_indexerconfig.content_fields.

This causes problems when modifying/extending the $bodytext because the modification will be done as many times as there are additional fields in the content_fields column of the tx_kesearch_indexerconfig table.

Passing the $field variable to the hook enables us to only executing the hook for a given field.

The change is backwards compatible since php just ignores arguments which are not present in the method signature.