-
-
Notifications
You must be signed in to change notification settings - Fork 254
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] solr_path_read
does not work properly
#3043
Comments
Hello, I think we encounter a problem related to this point. We put the path "/solr852/" in the field "solr_path_read" (Site module) and it does not seem to be taken into account. We tested ext:solr version 11.1.2, same problem in the 11.1.1. But the old version 11.0.3 works juste fine in production. Does anyone else have the same problem? Thank you. |
All who uses the Solr servers within a path or behind proxies. |
Same problem here. |
…path) Fixes TYPO3-Solr#3043 diff --git a/Classes/System/Solr/Node.php b/Classes/System/Solr/Node.php index 78f4ecee..ac2a0b16 100644 --- a/Classes/System/Solr/Node.php +++ b/Classes/System/Solr/Node.php @@ -48,22 +48,13 @@ class Node extends Endpoint ?string $username = null, ?string $password = null ) { - $path = (string)$path; - $elements = explode('/', trim($path, '/')); - $coreName = (string)array_pop($elements); - // Remove API version - array_pop($elements); - - // The path should always have the same format! - $path = trim(implode('/', $elements), '/'); - $options = [ 'scheme' => $scheme, 'host' => $host, 'port' => $port, - 'path' => '/' . $path, + 'context' => dirname($path), 'collection' => null, - 'core' => $coreName, + 'core' => basename($path), 'leader' => false, ];
Removes deprecated class ApacheSolrForTypo3\Solr\System\Solr\Node and it's usages. - Replace deprecated Node class with Endpoint - Replace getUsername/getPassword with getAuthentication() - Change SolrConnection->getNode() to SolrConnection->getEndpoint Resolves: TYPO3-Solr#3630, TYPO3-Solr#3043 Replaces: TYPO3-Solr#3518
Removes deprecated class ApacheSolrForTypo3\Solr\System\Solr\Node and it's usages. - Replace deprecated Node class with Endpoint - Replace getUsername/getPassword with getAuthentication() - Change SolrConnection->getNode() to SolrConnection->getEndpoint Resolves: TYPO3-Solr#3630, TYPO3-Solr#3043 Replaces: TYPO3-Solr#3518
Describe the bug
There are to many confusions about "/solr/" path segment for connection configurations.
Current code base is inconsistent and should be refactored.
The Site configuration has already split settings for path and core, so we should propagate them as is to the node initialization.
We should remove the processing/splitting from:
ext-solr/Classes/System/Solr/Node.php
Lines 47 to 54 in c7a0783
and concatenation to "path":
ext-solr/Classes/Domain/Site/SiteRepository.php
Lines 295 to 297 in c7a0783
and propagate the path and core as is without any processing.
Used versions (please complete the following information):
Additional context
Discussion started on https://typo3.slack.com/archives/C02FF05Q4/p1632990610130900
and #3041
The text in Site module "I.e. if you use Hosted-Solr.com the path inside the admin panel. Should not contain "/solr/".
" is wrong and vice versa...
The text was updated successfully, but these errors were encountered: