[TYPO3-dev] multilanguage search problem with l10n_mode exclude

Stefan Padberg post at bergische-webschmiede.de
Thu Oct 1 12:36:09 CEST 2015


Hi,

I have defined some fields in the TCA array with 'l10n_mode' =>
'exclude'. The content is the same in all languages, and there is no
need to make them writable for all language versions of the data set.

When I do a full text search on the content of these fields in the non
system languages, their content is not found, as the content for the
exclude fields is only stored in the system language versions of the
data set.

In the repository I have a function:

public function findBySearchword($searchword) {

  $query = $this->createQuery();

  $constraints = array();	
  $constraints[] = $query->like( 'type', '%'.$searchword.'%', FALSE );
  $constraints[] = $query->like( 'name', '%'.$searchword.'%', FALSE );

  $query->matching( $query->logicalOr($constraints) );
  $result = $query->execute();
  return $result;
}

The type field is an exclude field, the name field is mergeIfNotBlank.

There are no search results for the type field if sys_language > 0.

What can I do to handle the situation correctly?

Regards
Stefan




More information about the TYPO3-dev mailing list