1

So I have a section with 900 entries and I tried to just list them all on the page but Craft seems to choke after about 200 and will just not render any of them. Although I probably don't need to output all 900 it would be good to know what the issue is here?

2
  • Is this for a Structure section? – Ben Parizek Oct 1 '14 at 15:17
  • No, just a channel. – hamishtaplin Oct 2 '14 at 9:48
2

You may need to up your php memory limit. Should be good through Host CP to do, or if locally, edit the php.ini file.

Also, craft will generally max out at 100 entries as default so adding .limit(null) to a request should also help...

2
  • Thought it may be something to do with that, will check it out. – hamishtaplin Oct 1 '14 at 10:17
  • I also faced the same problem with a project I worked on about a month ago. It was slightly different in that I needed to list out assets, but I too was hitting my php memory limited after about 100 or so. Increasing your memory limit should fix the issue, but I wonder if serving up that many requests on a page is necessarily a good thing? Food for thought! – Jamie Wade Oct 1 '14 at 15:43
1

Other than increasing the amount of memory available to PHP like Simon suggested, you can also lazy load the entries in batches using the limit and offset parameters. This would help keep the memory consumption down.

The extra entries would be triggered via infinite scrolling or treeview, etc. depending on how you're displaying them on the front-end.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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