[TYPO3-Solr] Wrong language parameter in URLs of solr docs
Windisch, Nils Kolja
windisch at sub.uni-goettingen.de
Tue Nov 20 11:27:57 CET 2012
Hey,
thanks Dimitry, but... see below
On 20.11.2012, at 11:08, Dmitry Dulepov <dmitry.dulepov at gmail.com> wrote:
> Windisch, Nils Kolja wrote:
>> I'm using ext:solr EAP (rev about 4 weeks old, but i've also tried the public version with same results) multicore setup (one for each language) and get wrong URLs in solr docs and consequently the website frontend. The solr docs contain the (correct) language parameter 0 (which translates to "de") but the solr doc URL parameter contains the language parameter of the highest configured page language ("5" in my case).
>>
>> <doc>
>> [...]
>> <str name="language">0</str>
>> [...]
>> <str name="url">cz/digitale-bibliothek/onlinebibliographien/</str>
>> [...]
>> </doc>
>>
>> (a deactivated ext:realurl makes no difference, just "/?id=1234&L=5" instead of "/?id=1234&L=0")
>>
>> The "cz" in the URL translates to language parameter "5". If I hide language "5" lucene saves "4" etc.
>> The only option to get correct URLs for language "0" would be to hide all other languages (parameter> 0) which is not an option.
>>
>> Interestingly the "de"-index (language parameter "0") saves URLs without base url. In contrast: the "en" index (language parameter "1") (and obviously different solr core) saves URLs with the correct language parameter and prepended the base URL.
>
> Usually this happens when your conditions do not correctly switch cores according to the language. Try TS object browser in Web>Template and see if it works correctly.
Already tried that. Cycling through the conditions [globalVar = GP:L = 1] to [globalVar = GP:L = 5] via TypoScript Object Browser results in a correct selection of the according core.
in Constants:
plugin.tx_solr.solr.path = /solr/core_dev_de/
[globalVar = GP:L = 1]
plugin.tx_solr.solr.path = /solr/core_dev_en/
[global]
[globalVar = GP:L = 2]
plugin.tx_solr.solr.path = /solr/core_dev_fr/
[global]
[globalVar = GP:L = 3]
plugin.tx_solr.solr.path = /solr/core_dev_it/
[global]
[globalVar = GP:L = 4]
plugin.tx_solr.solr.path = /solr/core_dev_es/
[global]
[globalVar = GP:L = 5]
plugin.tx_solr.solr.path = /solr/core_dev_cz/
> You will need to clear the index completely after you fixed it.
yes, I did that every time i fiddled with various settings (and made sure the index is cleaned.)
Best,
Nils
More information about the TYPO3-project-solr
mailing list