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] Exception if no Solr connection is configured #3426

Closed
dkd-friedrich opened this issue Dec 19, 2022 · 1 comment · Fixed by #3485
Closed

[BUG] Exception if no Solr connection is configured #3426

dkd-friedrich opened this issue Dec 19, 2022 · 1 comment · Fixed by #3485
Assignees

Comments

@dkd-friedrich
Copy link
Member

Describe the bug
If no Solr connection is configured on pages with search or results plugin an exception occurs:

Call to a member function search() on null
in /var/www/html/public/typo3conf/ext/solr/Classes/Controller/SearchController.php line 110

EXT:solr detects the missing connection and handles the NoSolrConnectionFoundException but the default actions are still called, so this error occurs.

To Reproduce

  • Place a EXT:solr search or results plugin
  • Remove configured Solr connection if already configured

Expected behavior
No exception should occur, e.g. EXT:solr could just display a hint

Used versions (please complete the following information):

  • TYPO3 Version: 11.5
  • EXT:solr Version: 11.5.0
  • PHP Version: 7.4, 8.1
dkd-kaehm pushed a commit to sabbelasichon/ext-solr that referenced this issue Feb 15, 2023
If SearchService is not defined, we are forwarding to action solrNotAvailable

Fixes: TYPO3-Solr#3426
dkd-kaehm pushed a commit to dkd-kaehm/ext-solr that referenced this issue Feb 15, 2023
…onfigured

If SearchService is not defined, we are forwarding to action solrNotAvailable

Fixes: TYPO3-Solr#3426
Ports: TYPO3-Solr#3485
@dkd-kaehm
Copy link
Collaborator

@dkd-friedrich
Please review the patch and port.

dkd-kaehm pushed a commit that referenced this issue Mar 2, 2023
If SearchService is not defined, we are forwarding to action solrNotAvailable

Fixes: #3426
dkd-kaehm pushed a commit that referenced this issue Mar 2, 2023
…onfigured

If SearchService is not defined, we are forwarding to action solrNotAvailable

Fixes: #3426
Ports: #3485
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants