[TYPO3-Solr] Wrong language parameter in URLs of solr docs

Dmitry Dulepov dmitry.dulepov at gmail.com
Tue Nov 20 11:08:02 CET 2012


Hi!

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.

You will need to clear the index completely after you fixed it.

-- 
Dmitry Dulepov
TYPO3 core & security teams member

Simplicity will save the world.



More information about the TYPO3-project-solr mailing list