[TYPO3-mvc] Page repository using setRespectStoragePage(FALSE) doesn't return pages

Michael Knoll mimi at kaktusteam.de
Wed Jan 19 09:44:09 CET 2011


Hi Thomas,

had the same problems yesterday. Try getting the actual SQL Query from 
the Typo3-Backend in ExtBase. Maybe this helps you to see the error.

Don't forget to reset your record-type like:

config.[your_ext].persistence.classes.[your_class].mapping.recordType >

Otherwise, the repository will only fetch the records marked as records 
belonging to your recordType!


Hope this helps!

Greetings

Mimi




Am 17.01.11 18:05, schrieb Thomas "Thasmo" Deinhamer:
> Hi folks!
>
> I created an own page repository and have defined a new method
> "createQuery", like this:
>
> public function createQuery() {
> $query = parent::createQuery($this->objectType);
> $query->getQuerySettings()->setRespectStoragePage(FALSE);
> return $query;
> }
>
> Unfortunately when fetching pages, nothing is returned:
>
> $page = $this->pageRepository->findByUid(18);
> print count($page); // prints "0"
>
> I can't find the reason for this. Shouldn't the repository
> return the page, actually, if the storage page option is set to false?
>
> I'm lost here and would really appreciate your help!
>
> Best regards,
> Thomas



More information about the TYPO3-project-typo3v4mvc mailing list