My custom component's loop causes an endless loop :( any advice?
-
Hey everyone,
I’m making a custom component that allows users to upload videos…
I’ve written the part where if you visit the URL of someones video (site.com/username/videos/my-cool-video/) it finds and loads it…
I’m basing all this on the Groups component btw.
But when I wrote the directory with the ‘while ( bp_has_site_videos())’ loop, the page wouldn’t load… so I suspected something was wrong, stuck an $i counter in the loop and said (if ( $i>20 ) { die(‘error!’); } ) – and guess what…
The thing is, there are only four videos in the database… and all 20 results that it returned on the directory list are the first!
Any advice from developers please? I’m really confused.
Thanks!
- The topic ‘My custom component's loop causes an endless loop :( any advice?’ is closed to new replies.