I'm working on Typo3 6.2, below is an extract from my controller :
$event_to_display = $this->eventRepository->findByCustom();
$this->view->assign('event', $event_to_display);
and this is my custom repository :
public function findByCustom()
{
$query = $this->createQuery();
$query->matching($query->equals('sys_language_uid', 0));
return $query->execute();
}
but result is empty ! I believe my $query->equals() operation doesn't work but I can't understand why. Thus, I would like to add a second condition : how to do it ?
Edit : if I use findByUid() it works, then the issue must be located on my custom code, not the controller or the repo.
I think You forgot the set StoragePid
. So, First check storagePid
is set or not. If not set then set it first and clear the Install Tool
cache and check gain.
For set StoragePid.
-: Go to the main page > Templates, then go to constant editor and set StoragePID
of page with your records.