Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] TikaStatus can't handle all response types of SolrWriteService->extractByQuery() #217

Closed
dkd-friedrich opened this issue Oct 30, 2023 · 1 comment · Fixed by TYPO3-Solr/ext-solr#3858

Comments

@dkd-friedrich
Copy link
Member

Describe the bug

TikaStatus strictly expects that extractByQuery will return an array with 3 elements:
0 - content
1 - metadata
2 - response

Beside that the response will only be available with upcoming EXT:solr versions 12.0.1+ (introduced with TYPO3-Solr/ext-solr@0b1a6a1) SolrWriteService->extractByQuery() will return an empty array if an exception occurred.

So in 2 cases an exception will occur in the reports module currently:

  1. EXT:solr 12.0.0 is used
  2. An exception occurred during extraction

For example the following exception if EXT:solr 12.0.0 is used:

 Exception: "PHP Warning: Undefined array key 2 in Classes/Report/TikaStatus.php line 196" with code 1476107295 in /var/www/html/vendor/typo3/cms-core/Classes/Error/ErrorHandler.php line 138

A similar exception will occur if an empty array is returned. thus we should refactor the handling of the extractByQuery response.

To Reproduce
Steps to reproduce the behavior:

  1. Install EXT:tika 12.0.1 and EXT:solr 12.0.0
  2. Open the reports module
  3. Exception message will be shown in the Apache Tika section

Expected behavior

All type of responses of extractByQuery can be handled to give proper hints of the status in the reports module.

Used versions (please complete the following information):

  • TYPO3 Version: 12.4
  • EXT:solr Version: 12.0.0+
  • EXT:tika Version: 12.0.1
@dkd-kaehm
Copy link
Contributor

dkd-kaehm commented Nov 2, 2023

Fixed in TYPO3-Solr/ext-solr#3858
We'll ignore the case somebody uses EXT:solr 12.0.0 with EXT:tika 12.0.1+.
The EXT:solr 12.0.1 will be released soon.

dkd-kaehm added a commit to TYPO3-Solr/ext-solr that referenced this issue Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants