[TYPO3-mvc] Query Matching and Multilanguage
Matthias Krappitz
matthias at nospam.aemka.de
Sat Oct 13 13:03:24 CEST 2012
Hi,
Following Situation:
- I do a simple custom query in my repository via the query objects as seen
in the code below
- I got records with multilanguage overlays and the title of one example
record in the default language (German) is "Irgendetwas" and in the English
language overylay it is "Something" .
- The user then is in the english language version of the web-site in the
frontend, executes the following query and is searching for "Something",
wich then is in $value - but nothing gets found! But if I search for
"Irgendetwas" I find my example record.
...
$query = $this->createQuery();
return $query
->matching(
$query->like('title', '%' . $value . '%')
)
->execute();
...
I was expecting extbase would detect the frontend language and would also
then be searching in the correct language overlay records, but it obviously
does not, as the generated SQL of the above query contains "...
tx_myextension_domain_model_whatever.sys_language_uid IN (0,-1) ...". So it
only searches in the default language and in "any language"-records.
Is there anything I can do or configure about this behaviour to have it
working truly multilanguage? How are you handling this?
Best Wishes
Matthias Krappitz
w. www.aemka.de
More information about the TYPO3-project-typo3v4mvc
mailing list