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
136 stars 249 forks source link

[BUG] `solr_path_read` does not work properly #3043

Open dkd-kaehm opened 3 years ago

dkd-kaehm commented 3 years ago

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: https://github.com/TYPO3-Solr/ext-solr/blob/c7a07832989e01111b8cf8416624a70d6dde0ef0/Classes/System/Solr/Node.php#L47-L54

and concatenation to "path": https://github.com/TYPO3-Solr/ext-solr/blob/c7a07832989e01111b8cf8416624a70d6dde0ef0/Classes/Domain/Site/SiteRepository.php#L295-L297

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...

etnicoliver commented 3 years ago

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. The result is "Could not ping solr server, can not check version http://oursolrserver.com:8990/solr852/solr/core_cfwb/" I don't know why there is "/solr/" in the middle, the correct path is /solr852/core_cfwb/.

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. Our solr server version is 8.5.2. Typo3 version is 10.4.21

Does anyone else have the same problem?

Thank you.

dkd-kaehm commented 3 years ago

Does anyone else have the same problem?

All who uses the Solr servers within a path or behind proxies. Please use /solr852/solr/ in solr_path_read. The bad thing is that mentioned above array_pop($elements); cuts the latest element from path.

stat1x commented 1 year ago

Same problem here. The given workaround does not seem to work in my case.