TYPO3-Solr / ext-solr

A TYPO3 extension that integrates the Apache Solr search server with TYPO3 CMS. dkd Internet Service GmbH is developing the extension. Community contributions are welcome. See CONTRIBUTING.md for details.
GNU General Public License v3.0
137 stars 252 forks source link

[BUG] Wrong facet links in combination with search form produce exception #2687

Closed utrotzek closed 4 years ago

utrotzek commented 4 years ago

Describe the bug When I click on a facet link the frontend produces the following exception

1298012500 TYPO3\CMS\Extbase\Mvc\Controller\Exception\RequiredArgumentMissingException
Required argument "queryString" is not set for ApacheSolrForTypo3\Solr\Controller\SuggestController->suggest.

I'm using the solr_pi_results plugin with the search form and the facets on one page. The autocomplete feature is enabled as well. I'm currently migrating vom TYPO3 8.7 to TYPO3 10. Before the upgrade everything worked smoothly.

To Reproduce Steps to reproduce the behavior:

  1. Search for something (with facet results)
  2. Click on one of the facets
  3. See the above mentioned exception

Expected behavior No exception and the search result should be filtered by the selected facet.

Used versions (please complete the following information):

Additional context Maybe the error is instance related but I really don't know what I could do to fix this. Maybe someone can reproduce this. I also did some debugging and find out that every facet link has the GET parameter &type=7384 appended which leads to the mentioned exception. But I don't know WHY this link is created. As far as I could see these links are generated once and stored with some kind of a hash and will then be reused. But I could not figure out the problem behind that.

My workaround now is to override the partial Partials/Search/Form.html and add the addSuggestUrl="0" option to the search form. This fixes the bug, but the autocomplete is obviously not working.

<s:searchForm id="tx-solr-search-form-pi-results" additionalFilters="{additionalFilters}" suggestHeader="{s:translate(key:'suggest_header',default:'Top Results')}" addSuggestUrl="0">
dkd-kaehm commented 4 years ago

Problem is known and fixed in current master and release-11.0.x branches. It will be available soon in 11.0.3. See: #2659