[TYPO3-mvc] multi language site, records fetched two times

Alex Tuveri at at uniud.it
Fri Jul 8 14:13:32 CEST 2016


Hi all
I hope to be clear, this is a strange behaviour and I am at my first EXTBASE extension....

Within the template I have a foreach cycle to render some records. OK all is working fine if the site has only 1 language.

But when I create a record localized,  first language: italian, second language: english
the site is working correctly (labels, etc. all is translated as expected),

Instead, the foreach viehelper prints out the record two times, this  a strange, unattended, behaviour.

What happens, see here:

BE - the record was added correctly via BE; first language: italian
      - then it is localized in the second language: english

template > debug; this is what is printed out:
Results of customers query
TYPO3\CMS\Extbase\Persistence\Generic\QueryResultprototypeobject (2 items)
   0 => Specialistaweb\Soho\Domain\Model\Normalprototypepersistent entity (uid=1, pid=94)
   1 => Specialistaweb\Soho\Domain\Model\Normalprototypepersistent entitysee above (uid=1, pid=94)

as you can see instead of 1 record we have 2  records (?) 0, 1
and the second record is a persistenti_entity with the message "see above" (why?!?)

Output: the same (unique) record is printed out twice (?)

I attempted to:

hide a record (i.e. italian) or the respective english record.

If I hide the italian record (via BE), this is strange, the output is correct, debugger:
TYPO3\CMS\Extbase\Persistence\Generic\QueryResultprototypeobject (1 items)
   0 => Specialistaweb\Soho\Domain\Model\Normalprototypepersistent entity (uid=1, pid=94)
(as you can see 0, only the record in italian)

If I hide the italian record (via BE), this is strange, the output is correct, debugger:
TYPO3\CMS\Extbase\Persistence\Generic\QueryResultprototypeobject (1 items)
   0 => Specialistaweb\Soho\Domain\Model\Normalprototypepersistent entity (uid=1, pid=94)
(as you can see 0, only the record in italian)

the same happens for the english record and the output is localized ok.

It seems that when one or another record (italian or english) is hidden, all working ok, but when both are enabled (not hidden) the record is printed two times (?).


repository object is initialized (I suppose) correctly
 $querySettings->setIgnoreEnableFields(FALSE);

thank you anyone for suggestions.






More information about the TYPO3-project-typo3v4mvc mailing list