[TYPO3-english] Indexed search displays results in all site languages

Oliver Salzburg kinggencha at googlemail.com
Mon Sep 12 15:41:44 CEST 2011


On 2011-09-08 21:21, Oliver Salzburg wrote:
> Hi,
>
> I have a site that uses 4 languages. When performing a search on the
> site while using the default language, indexed search will return
> results in all 4 languages configured on the site.
> Performing the same search in any of the 3 non-default languages, will
> only show results in the selected language.
>
> I use the following TS and thought it would be sufficient to handle the
> issue.
>
> plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 0
> [globalVar = GP:L = 1]
> plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 1
> [end]
> [globalVar = GP:L = 2]
> plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 2
> [end]
> [globalVar = GP:L = 3]
> plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 3
> [end]
>
> Thanks for any help

So I have been investigating this issue further and noticed, that the 
results that were being shown in the wrong language were exclusively
tt_news entries. It all isn't very surprising given that the crawler
configuration for our tt_news section is:

tx_crawler.crawlerCfg.paramSets.www-tt_news = 
&tx_ttnews[tt_news]=[_TABLE:tt_news;_PID:512]

So no language information is relayed and all tt_news entries (no
matter what language) will be stored with language_id = 0.

So I thought I was being smart by simple changing the configuration to:

tx_crawler.crawlerCfg.paramSets.www-tt_news = 
&tx_ttnews[tt_news]=[_TABLE:tt_news;_PID:512]&L=[_TABLE:tt_news;_FIELD:sys_language_uid;_PID:512]

But that's just as bad. Now every article get stored with every
language_id.


More information about the TYPO3-english mailing list