4

I just can't findAll() make return anything even though I am able to access a specific record by findByUid().

I have taken note (and tried to workaround / set up) of the typoscript solution and the record storage page bug without any success.

I am using a dummy extension code made by the extension builder in TYPO3 (current version) for your convenience. I have tested with data manually added through the TYPO3 config ui.

Any help would be much appreciated.

All the best and thanks in advance

Mario

1 Answer 1

12

For 99.9 % you didn't set your storagePid properly, it has to be the PID of the page where your records are stored. Effect: findAll() uses this PID to filter the records, while findByUid(uid) ignores PID (it searches by UID wherever record is stored.

Go to the main page > Templates and make sure that you included TypoScript from your new ext, then go to constant editor and set proper PID of page with your records. Clear whole cache at the end!

Also you can debug your SQL statement like in this answer, most probably at the end of statement you'll see something like AND your_table_name.pid IN (0) which definitely means that you didn't set storagePid or you didn't clear the cache.

1
  • Had the same issue. Simply forgot to include the TypoScript, which you also mentioned. Thanks!
    – maryisdead
    Jan 8, 2015 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.